Re: gcc-4.3 considers unaligned accesses on X86 as undefined

Andi Kleen
2008-03-26T05:30:30Z

Török Edwin <edwintorok@gmail.com> writes:

> At -O3 it generates vectorized code that _relies_ on the fact that
> pointers are always aligned (unless you use packed attributes, etc.),
> and the resulting code crashes if the pointer is unaligned. (-O3 -msse
> on 32-bit, and simply -O3 on 64-bit since -msse is default)

The 2.6 kernel disables SSE and MMX code generation explicitely.
2.4 should be also safe unless someone misguided recompiles it with -O3.

-Andi