--- Comment #4 from akr at m17n dot org 2008-03-04 00:17 ---
The result can be representable by ptrdiff_t
because the result is number of longs.
The array is bit larger than 2**31 bytes.
So the result is bit larger than 2**29.
It is representable in signed.
--
http://gcc.gnu.org
--- Comment #2 from akr at m17n dot org 2008-03-03 23:45 ---
(In reply to comment #1)
> nelem*sizeof(long)
>
> Wraps so what do you expect? This is the correct behavior really.
Oops. It wrapped.
But changing the type of nelem to size_t doesn't change the situation.
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35427
--- Comment #1 from akr at m17n dot org 2007-11-23 07:52 ---
(In reply to comment #0)
> isnan(0.0/0.0) returns false.
> It returns true if -fno-builtin.
I found it is a problem of FPU emulation in Linux kernel.
The problem is caused by FASTFPE.
NWFPE doesn't have
gister variable and memcmp
Product: gcc
Version: 4.2.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
GCC build triplet: i686
oduct: gcc
Version: 4.1.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
GCC build triplet: armv5tejl-unknown-linux-gnu
GCC host trip
--- Comment #4 from akr at m17n dot org 2007-05-07 06:56 ---
I think the problem can be fixed by alloca or setjmp.
* alloca extends a stack as the old stack backchain will not crashed, or
* setjmp saves the stack backchain and longjmp restore it.
I'm not sure that which should be
--- Comment #1 from akr at m17n dot org 2006-06-29 01:49 ---
I found a way to reproduce the bus error with -O2 as well as -O0.
% cat z.c
#include
jmp_buf env;
int i;
int main()
{
if (setjmp(env) == 0) {
char *p = __builtin_alloca(1024);
for (i = 0; i < 1024; i++) {
Summary: longjmp and alloca cause bus error
Product: gcc
Version: 4.1.1
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
GCC build triplet: powerpc-apple-darwin8.6.0
GCC host triplet: powerpc-apple-darwin8.6.0
GCC target triplet: powerpc-apple-darwin8.6.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28197
& n <= 1073741823 is true where n is
1073741824
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: a
--- Additional Comments From akr at m17n dot org 2005-06-29 03:50 ---
I think getcontext should return twice because getcontext is similar to setjmp.
First, getcontext returns from usual function call.
Second, getcontext returns from setcontext.
--
http://gcc.gnu.org/bugzilla
--- Additional Comments From akr at m17n dot org 2005-06-20 17:36 ---
Although I have no Sun's Compiler, I found some pragmas about header file in
SunOS:
#pragma unknown_control_flow(setjmp)
#pragma unknown_control_flow(_setjmp)
#pragma unknown_control_flow(sigsetjmp)
#p
--- Additional Comments From akr at m17n dot org 2005-06-20 17:22 ---
It's because getcontext is similar to setjmp.
Since setjmp/getcontext doesn't save registers in register window, modifications
to the registers between first setjmp/getcontext return and longjmp/setconte
duct: gcc
Version: 4.0.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build t
--- Additional Comments From akr at m17n dot org 2005-06-08 06:19 ---
Oops. The newlines are squashed. I repeat the report as this comment.
I found that following code causes SEGV on IA-64 Debian GNU/Linux (sarge)
with gcc-4.0 -O1.
The code uses getcontext and setcontext which is
; | | if (tname[1] == 'i' So I guess the problem
can be fixed if gcc knows getcontext returns twice.
--
Summary: IA-64 register stack is not preserved after getcontext
call
Product: gcc
Version: 4.0.1
Status: UNCONFIRME
doesn't execute a body
Product: gcc
Version: 4.1.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
CC: gc
ry: buf[i+i]=0 stores buf[i] when -O2
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n dot org
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21297
18 matches
Mail list logo