[Zlib-devel] [6/4][RFC Patch] fix flags corruption on x86
Jan Seiffert
kaffeemonster at googlemail.com
Tue Mar 15 19:30:30 EDT 2011
Clearly not my day, first my car broke down, and now the second
correction patch...
While restructuring the code for submission i totally overlooked the
fine detail that testing for an i486 tests the AC bit in the EFLAGS
register.
It stands for "Alignment Check", this way you can make your x86 as
picky about alignment as most other archs. Any unaligned load when set
and you get a SIGBUS.
Problem is: That unaligned loads are allowed on x86 is ingrained into
to much software, even libc and the compiler. Soon after setting that
bit something will crash.
So restore the old EFLAGS after testing.
This will be folded into the x86 patch.
Thanks go to Cristian Rodríguez for testing my patches and finding the issues.
Greetings
Jan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fix_ac_flags_corruption.patch
Type: text/x-patch
Size: 916 bytes
Desc: not available
URL: <http://madler.net/pipermail/zlib-devel_madler.net/attachments/20110316/2fe33c60/attachment.bin>
More information about the Zlib-devel
mailing list