[Bug target/28197] longjmp and alloca cause bus error at -O0

2007-05-06 Thread akr at m17n dot org
--- 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

[Bug target/28197] longjmp and alloca cause bus error at -O0

2007-04-25 Thread geoffk at gcc dot gnu dot org
--- Comment #3 from geoffk at gcc dot gnu dot org 2007-04-25 19:49 --- I'm fairly sure this is in fact a bug in GCC. The problem is that in a routine which uses setjmp, alloca() must ensure that the previous stack backchain is preserved, which means it needs to allocate enough space

[Bug target/28197] longjmp and alloca cause bus error at -O0

2007-04-25 Thread geoffk at gcc dot gnu dot org
-- geoffk at gcc dot gnu dot org changed: What|Removed |Added Status|UNCONFIRMED |NEW Ever Confirmed|0 |1 Last

[Bug target/28197] longjmp and alloca cause bus error at -O0

2006-10-29 Thread pinskia at gcc dot gnu dot org
--- Comment #2 from pinskia at gcc dot gnu dot org 2006-10-29 21:29 --- This is not a bug in GCC but rather longjump/setjmp on Darwin, report this bug to Apple. -- pinskia at gcc dot gnu dot org changed: What|Removed |Added

[Bug target/28197] longjmp and alloca cause bus error at -O0

2006-06-28 Thread akr at m17n dot org
--- 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++) {