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

gpnuma at centaurean dot com gcc-bugzilla@gcc.gnu.org
Thu May 21 10:32:00 GMT 2015


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 things are much slower... this "undefined behaviour" is
really treacherous !!

Is there any way to ensure proper alignment so I don't fall into this trap and
still benefit from maximum speed ?



More information about the Gcc-bugs mailing list