[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added Status|UNCONFIRMED |WAITING

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #2 from gpnuma at centaurean dot com --- I understand you're short of time but this problem is very difficult to reproduce !! I did try to compile and link with -fsanitize=undefined this morning, now here's the interesting part : *

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #3 from Markus Trippelsdorf trippels at gcc dot gnu.org --- Another thing you might try is to use: -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations (as per http://gcc.gnu.org/bugs/) and see if the issue goes away, too.

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #10 from Markus Trippelsdorf trippels at gcc dot gnu.org --- (In reply to gpnuma from comment #8) Thanks Markus I didn't think these alignment issues were actually the problem, it goes a long way. By doing memmoves instead of

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #5 from gpnuma at centaurean dot com --- Ok I did just try -fno-strict-aliasing -fwrapv -fno-aggressive-loop-optimizations and the issue is still there. If I add the printf(something); at the top of the function, everything works

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 Markus Trippelsdorf trippels at gcc dot gnu.org changed: What|Removed |Added Status|WAITING

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #9 from gpnuma at centaurean dot com --- What I mean is the structs I was using the pointer casts allocations with are instanciated by the program itself, so there could be a way to instanciate them with the required alignment I

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #4 from gpnuma at centaurean dot com --- Sorry I meant gcc 4.9.2 / -O3 of course, 4.8 works fine.

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #7 from Markus Trippelsdorf trippels at gcc dot gnu.org --- See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65709 for a similar bug in LZ4.

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #8 from gpnuma at centaurean dot com --- Thanks Markus I didn't think these alignment issues were actually the problem, it goes a long way. By doing memmoves instead of pointer cast allocations I got rid of the segfault, but of

[Bug c/66230] Using optimizations causes program to segfault

2015-05-21 Thread gpnuma at centaurean dot com
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 --- Comment #11 from gpnuma at centaurean dot com --- (In reply to Markus Trippelsdorf from comment #10) (In reply to gpnuma from comment #8) Thanks Markus I didn't think these alignment issues were actually the problem, it goes a long way.