[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#432861: marked as done (Compiles arch/x86_64/kernel/signal.c from Linux 2.6.22 incorrectly)



Your message dated Sat, 14 Jul 2007 14:05:06 +0100
with message-id <4698CA02.8090302@martinorr.name>
and subject line Bug#432861: Compiles arch/x86_64/kernel/signal.c from Linux 2.6.22 incorrectly
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: gcc-4.2
Version: 4.2-20070707-1
Severity: important

When I build the kernel (either 2.6.21 or 2.6.22) with gcc 4.2-20070707-1,
then try to boot, I get a hang in udevsettle.  If I build with gcc
4.2-20070627-1, everything is fine.

The file which matters is arch/x86_64/kernel/signal.c.  The gcc version used
to compile this file determines whether the bug triggers or not, independent
of the version used to compile the rest of the kernel.

The command used to compile this file is:
gcc -Wp,-MD,arch/x86_64/kernel/.signal.s.d  -nostdinc -isystem
/usr/lib/gcc/x86_64-linux-gnu/4.2.1/include -D__KERNEL__ -Iinclude  -include
include/linux/autoconf.h -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs
-fno-strict-aliasing -fno-common -Os  -march=k8 -m64 -mno-red-zone
-mcmodel=kernel -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables
-funit-at-a-time -mno-sse -mno-mmx -mno-sse2 -mno-3dnow
-maccumulate-outgoing-args   -fstack-protector -fomit-frame-pointer
-fno-stack-protector -Wdeclaration-after-statement -Wno-pointer-sign
-D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(signal)"
-D"KBUILD_MODNAME=KBUILD_STR(signal)" -fverbose-asm -S -o
arch/x86_64/kernel/signal.s arch/x86_64/kernel/signal.c

Note that I am using -Os but replacing this with -O2 still causes the bug.
-O1 and -O0 appear to work correctly.

The assembly which 4.2-20070707 with -Os produces for this file includes the
following clearly silly code:
        orl     %ecx, %esi      # __pu_err, __pu_err
        orl     %edx, %esi      # __pu_err, __pu_err
        orl     %ecx, %esi      # __pu_err, __pu_err
        orl     %eax, %esi      # __pu_err, __pu_err
        orl     %ecx, %esi      # __pu_err, __pu_err
        orl     %ecx, %esi      # __pu_err, __pu_err
        orl     %ecx, %esi      # __pu_err, __pu_err
This is only the error handling, and appears to be something of a red
herring, because -O1 gives a similar silly piece of code but the kernel
still works.

The assembly files produced by different compiler versions and optimisations
are at http://www.srcf.ucam.org/~mpo25/2007/linux-signal/

For more, see http://thread.gmane.org/gmane.linux.kernel/551982/focus=553590

--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.21

Debian Release: lenny/sid
  990 unstable        www.debian-multimedia.org
  990 unstable        ftp.ie.debian.org
  990 unstable        ftp-uxsup.csx.cam.ac.uk
  500 testing         ftp.ie.debian.org
  500 testing         ftp-uxsup.csx.cam.ac.uk
    1 experimental    ftp.ie.debian.org
    1 experimental    ftp-uxsup.csx.cam.ac.uk

--- Package information. ---
Depends                      (Version) | Installed
======================================-+-======================
gcc-4.2-base        (= 4.2-20070707-1) | 4.2-20070707-1
cpp-4.2             (= 4.2-20070707-1) | 4.2-20070707-1
binutils          (>= 2.17cvs20070426) | 2.17.20070406cvs-2
libgcc1          (>= 1:4.2-20070707-1) | 1:4.2-20070707-1
libgomp1           (>= 4.2-20070707-1) | 4.2-20070707-1
libc6                       (>= 2.5-5) | 2.6-2


-- 
Martin Orr




--- End Message ---
--- Begin Message ---
Version: 4.2-20070712-1

On 13/07/07 16:33, Matthias Klose wrote:
> Martin Orr writes:
>> When I build the kernel (either 2.6.21 or 2.6.22) with gcc 4.2-20070707-1,
>> then try to boot, I get a hang in udevsettle.  If I build with gcc
>> 4.2-20070627-1, everything is fine.
> 
> please recheck with 4.2-20070712-1 when it's built for amd64.

That does indeed fix it.  For the sake of completeness, I tracked it down in
the GCC SVN.  It was introduced in gcc-4_2-branch in revision 126418 and
fixed in 126487.

Best wishes,

-- 
Martin Orr

Attachment: signature.asc
Description: OpenPGP digital signature


--- End Message ---

Reply to: