------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-20 23:02 ------- Oh, even at -O0 -funit-at-a-time, we get this missed compiled.
There are buffer overflows somewhere: ******* mudflap violation 1 (check/write): time=1116629904.932813 ptr=0x80ce540 size=33 pc=0x45b4a8 location=`crypt-bug.c:206 (encrypt)' /home/peshtigo/pinskia/linux/lib/libmudflap.so.0(__mf_check+0x48) [0x45b4a8] ./a.out(encrypt+0x1c7) [0x80499c4] ./a.out(crypt+0xaaf) [0x804be45] Nearby object 1: checked region begins 0B into and ends 1B after mudflap object 0xa095a08: name=`crypt-bug.c:190 L' bounds=[0x80ce540,0x80ce55f] size=32 area=static check=0r/4w liveness=4 alloc time=1116629904.932154 pc=0x45bfe8 Nearby object 2: checked region begins 32B before and ends 0B into mudflap object 0xa095a70: name=`crypt-bug.c:190 R' bounds=[0x80ce560,0x80ce57f] size=32 area=static check=0r/3w liveness=3 alloc time=1116629904.932158 pc=0x45bfe8 number of nearby objects: 2 Fixing that I get a different the abort, can you double check to make sure this code is really valid, from the looks of it, it is not. The code is assuming that L and R come right after each in memory, and that is a false assumption. -- What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Resolution| |INVALID Summary|[4.0 Regression] gcc |[4.0 Regression] gcc |miscompiles with -Os (wrong |miscompiles with -funit-at- |code at least on i386, |a-time |x86_64 and ppc) | http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21688