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

From: Andi Kleen
Date: Wed Mar 26 2008 - 01:30:31 EST


TÃrÃk Edwin <edwintorok@xxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/