Re: Architectures where unaligned access is (not) OK?
On Sat, Nov 22, 2014 at 10:37 PM, brian m. carlson
<sandals@crustytoothpaste.net> wrote:
> On Sat, Nov 22, 2014 at 09:42:43PM +0100, Jakub Wilk wrote:
>> * Henrique de Moraes Holschuh <hmh@debian.org>, 2014-11-21, 17:34:
>> >i386:
>> > __asm__("pushf\norl $0x40000,(%esp)\npopf");
>>
>> It works! Actually, it works so well it makes puts("hello world") die with
>> SIGBUS. :-(
>
> Yeah, that's my experience, too. glibc is not alignment check-safe on
> i386 and amd64. If you turn it on in an LD_PRELOAD using _init, it
> segfaults before main.
I have improved https://wiki.debian.org/ArchitectureSpecificsMemo fell
free to add to it.
Bastien
> brian m. carlson / brian with sandals: Houston, Texas, US
> +1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
> OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Reply to: