[Zlib-devel] HEADS UP: Apparent bad compilation under (just released) GCC 4.5.0
Jesus Cea
jcea at jcea.es
Tue May 4 13:47:26 EDT 2010
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I have been investigating crashes with ZLIB 1.2.5 for a week. First, I
hit the (old) libxml2 bug (accessing private structures inside zlib).
Please, write down a warning in the documentation when you find
something like this, to notify users like me that we need to upgrade
more than ZLIB.
Now I have stranges crashes when using zlib 1.2.5, python and psyco (a
kind of JIT for python). I have a crash everytime I do an import of any
zipped library. 100% reproductible.
The problem is a memory corruption. Trying under GDB, the stack is very
damaged.
The problem doesn't exist if I disable compiler optimizations when
compiling zlib.
After days messing with GDB with little luck, and knowing that the
problem seems to be related to optimization, I determine that the issue
is in "inftrees.c". If I compile everything optimized EXCEPT this
particular file, the crash vanishes.
I compile zlib 1.2.3 and it crashes too!. zlib 1.2.3 is the version
currently running in my system, and it works... compiled with old
compiler. Compiling with GCC 4.5.0, it crashes.
I confirm this compiling zlib 1.2.5 under GCC 4.4.3, using other
machine. This version works correctly.
So, GCC 4.5.0 seems to be doing something wrong.
The only other option is that psyco is messing things. Could be
possible, since it generates x86 code directly (like a jit), so maybe it
is messing the environment. I am using version 1.6, released in 2007, I
think. Stable since.
I am still trying to determine the exact scope. But even if the fault is
not in zlib, I think it is useful you are aware of this particular
issue, just in case you start getting other negative feedback, now that
GCC 4.5.0 is out (two weeks ago).
If you have any suggestion of how to debug this, please, let me know. I
have experience with ASM, but not under x86 (could try).
I am under Solaris 10, x86, compiling zlib as 32 bits.
If you think this messsage is inadecuate for zlib-devel, let me know.
- --
Jesus Cea Avion _/_/ _/_/_/ _/_/_/
jcea at jcea.es - http://www.jcea.es/ _/_/ _/_/ _/_/ _/_/ _/_/
jabber / xmpp:jcea at jabber.org _/_/ _/_/ _/_/_/_/_/
. _/_/ _/_/ _/_/ _/_/ _/_/
"Things are not so easy" _/_/ _/_/ _/_/ _/_/ _/_/ _/_/
"My name is Dump, Core Dump" _/_/_/ _/_/_/ _/_/ _/_/
"El amor es poner tu felicidad en la felicidad de otro" - Leibniz
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iQCVAwUBS+BdrZlgi5GaxT1NAQJhewP+Ji8laoJv4tLsTdI/MWTa3F/MdA2ANF3x
ZNJbgVa7UL4WRiJQiQW0mks84Ebgw1+nNK+aUtBEgkoLXEemUNm6IZnt+n35Na1G
nE1md0xTYiLVgbh5iYYOmqfi045V9ctCt2KgKBTlZXzV35l67TBbLvfaTXODNtfm
Wf2vEeaV+FA=
=N22K
-----END PGP SIGNATURE-----
More information about the Zlib-devel
mailing list