https://bugzilla.novell.com/show_bug.cgi?id=638750 https://bugzilla.novell.com/show_bug.cgi?id=638750#c0 Summary: Bug in GCC: generates wrong Code whem optimizing Classification: openSUSE Product: openSUSE 11.3 Version: Final Platform: x86-64 OS/Version: openSUSE 11.3 Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: Ralf.Friedl@online.de QAContact: qa@suse.de Found By: --- Blocker: --- User-Agent: Mozilla/5.0 (Windows; U; Win98; de-AT; rv:1.8.1.24) Gecko/20100228 SeaMonkey/1.1.19 Compiler: gcc (SUSE Linux) 4.5.0 20100604 [gcc-4_5-branch revision 160292] When compiling mksquashfs from squashfs3.4, the compiler generates wrong code with -O2 in function create_inode in file squashfs3.4/squashfs-tools/mksquashfs.c. The function makes use of some similar but different, longer macros in different branches of the function. With -fno-tree-pta, the code works. The compiler even generates unaligned overlapping like "movl $0,0; movl $0,1;". The second assign is both unaligned and overlaps three bytes of the long starting at 0. The generated code first computes the right value and then overwrites it with 0 with these instructions. The bug affects both i586 and x86-64. This bug may be related to Bug 636118 - "gcc 4.5 breaks mozilla's libffi implementation", or maybe not, because it mentions "It only fails for i586 but not x86-64." gcc (SUSE Linux) 4.5.0 20100722 [gcc-4_5-branch revision 162408] produces working code. If you are interested, I can supply the preprocessor output and the assembly file, but as the bug seems to be already fixed in newer versions of gcc, I suggest to just update the compiler to a newer version. Reproducible: Always Steps to Reproduce: 1. Compile mksquashfs 2. Create squashfs file system. 3. File system is corrupt. Actual Results: Generated file system is corrupt. Expected Results: Generated file system is not corrupt. This bug has affected different people on different systems with i586 and x86-64 on Intel and AMD CPUs who tried to use this program. -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.