.
--
Summary: pointer subtraction in very big array
Product: gcc
Version: 4.2.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: akr at m17n
--- 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.
nelem * sizeof
--- 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 #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 the problem.
--
akr
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-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux
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 triplet: armv5tejl-unknown-linux-gnu
GCC target
--- 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 done
--
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
--- 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 setjmp.h
jmp_buf env;
int i;
int main()
{
if (setjmp(env) == 0) {
char *p = __builtin_alloca(1024);
for (i = 0; i 1024; i
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: gcc-bugs at gcc dot gnu dot org
GCC target triplet: i686
--- 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
: 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 triplet
--- 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/setcontext
call
--- 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)
#pragma
: akr at m17n dot org
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: ia64-unknown-linux-gnu
GCC host triplet: ia64-unknown-linux-gnu
GCC target triplet: ia64-unknown-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21957
--- 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
: 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=21332
: 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