[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 w

[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 --- (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 pointer cast allocations 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 #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 suppos

[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 course

[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 --- 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 trippels at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66230 Markus Trippelsdorf changed: What|Removed |Added Status|WAITING |RESOLVED Resolution|---

[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 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 #3 from Markus Trippelsdorf --- 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 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 : * no

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

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