zlib-1.2.5 => firefox crash

Andrew Benton b3nton at gmail.com
Thu Jun 17 08:34:10 PDT 2010

On 17/06/10 11:50, Andrew Benton wrote:
> On 17/06/10 04:52, x2164 at lycos.com wrote:
>>      IIRC it would seem that gcc-4.5.0 has changed its default
>>      behavior for stack alignment.  Instead of 16 byte boundaries
>>      its using 32 byte boundaries.  I'm not sure if this only
>>      applies to x86_64 machines, all machines, or what.  Not even
>>      sure if the numbers "16" and "32" used above are correct or
>>      that it was the alignment of the "stack".
>>      I think someone suggested using something like "-mstack-align"
>>      on the gcc-4.5.0 command to cause the normally expected behavior.
> Thanks, I hadn't connected it with gcc-4.5.0. Googling on that led
> to a very interesting thread here:
> http://mail.madler.net/pipermail/zlib-devel_madler.net/2010-May/002277.html
> It seems zlib-1.2.5 needs the cflag -mstackrealign (not tested it yet)

Indeed it works. Before I compiled zlib I used this sed on configure:

sed -i 's/--O/--mstackrealign -O/' configure

and hey presto - firefox does not segfault. At least, not yet. Adding 
-mstackrealign to zlib's CFLAGS seems to fix the problem. Thanks for the 


More information about the blfs-support mailing list