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

gcc default for amd64 (Re: Bug#250174: gcc-3.3: Miscompilation of Objective-C code on amd64.)



Hi amd64 people, why don't you use gcc-3.4 as the default compiler for
this platform???

	Matthias


Kurt Roeckx writes:
> Package: gcc-3.3
> Version: 3.3.3-7
> 
> gcc-3.3 is miscompiing gnustep-base 1.9.1 on amd64.  gcc-3.4
> properly compiles it though.
> 
> We get a segmentation fault running:
> ../../Tools/obj/autogsdoc -Project General
> -DocumentationDirectory General  -MakeDependencies
> General/dependencies Debugging.gsdoc OpenStepCompliance.gsdoc
> 
> 
> Program received signal SIGSEGV, Segmentation fault.
> [Switching to Thread 16384 (LWP 29136)]
> 0x0000002a95c9c506 in objc_msg_lookup_super () from
> /usr/lib/libobjc.so.1
> (gdb) bt
> #0  0x0000002a95c9c506 in objc_msg_lookup_super () from
> /usr/lib/libobjc.so.1
> #1  0x0000002a95810963 in -[NSRecursiveLock init] (self=0x573de0,
>     _cmd=0x2a95a79d00) at NSLock.m:582
> #2  0x0000002a958231c9 in +[NSObject new] (self=0x2a95a73240,
>     _cmd=0x2a95a79c70) at NSObject.m:1083
> #3  0x0000002a95822e76 in +[NSObject initialize]
> (self=0x2a95a79b20,
>     _cmd=0x2a95a97ad0) at NSObject.m:930
> #4  0x0000002a95c9c973 in __objc_install_premature_dtable ()
>    from /usr/lib/libobjc.so.1
> #5  0x0000002a95c9c983 in __objc_install_premature_dtable ()
>    from /usr/lib/libobjc.so.1
> #6  0x0000002a95c9c7ed in __objc_init_dispatch_tables ()
>    from /usr/lib/libobjc.so.1
> #7  0x0000002a95c9dad7 in objc_msg_lookup () from
> /usr/lib/libobjc.so.1
> #8  0x00000000004019a9 in main (argc=9, argv=0x7fbffff758,
> env=0x7fbffff7a8)
>     at autogsdoc.m:556
> (gdb) frame 1
> #1  0x0000002a95810963 in -[NSRecursiveLock init] (self=0x573de0,
>     _cmd=0x2a95a79d00) at NSLock.m:582
> 582       self = [super init];
> (gdb) p *self
> $1 = {isa = 0x2a95a73240, _mutex = 0x0}
> (gdb) frame 0
> #0  0x0000002a95c9c506 in objc_msg_lookup_super () from
> /usr/lib/libobjc.so.1
> (gdb) info reg
> rax            0x3e005d002f005c 17451847991099484
> rbx            0x573de0 5717472
> rcx            0x573b10 5716752
> rdx            0x600000000      25769803776
> rsi            0x2a95a737b0     182899390384
> rdi            0x7fbffff320     548682068768
> rbp            0x2a95a737b0     0x2a95a737b0
> rsp            0x7fbffff2f0     0x7fbffff2f0
> r8             0x111    273
> r9             0x5a6a00 5925376
> r10            0x2a955699e0     182894107104
> r11            0x2a95c9c4e0     182901654752
> r12            0x3e005d002f005c 17451847991099484
> r13            0x9      9
> r14            0x2a968c6508     182914409736
> r15            0x4018f8 4200696
> rip            0x2a95c9c506     0x2a95c9c506
> <objc_msg_lookup_super+38>
> eflags         0x10202  66050
> cs             0x33     51
> ss             0x2b     43
> ds             0x0      0
> es             0x0      0
> fs             0x0      0
> gs             0x0      0
> (gdb) disassemble
> Dump of assembler code for function objc_msg_lookup_super:
> 0x0000002a95c9c4e0 <objc_msg_lookup_super+0>:   sub    $0x18,%rsp
> 0x0000002a95c9c4e4 <objc_msg_lookup_super+4>:   mov    %rbp,0x8(%rsp)
> 0x0000002a95c9c4e9 <objc_msg_lookup_super+9>:   mov    %rbx,(%rsp)
> 0x0000002a95c9c4ed <objc_msg_lookup_super+13>:  mov    %r12,0x10(%rsp)
> 0x0000002a95c9c4f2 <objc_msg_lookup_super+18>:  cmpq   $0x0,(%rdi)
> 0x0000002a95c9c4f6 <objc_msg_lookup_super+22>:  mov    %rsi,%rbp
> 0x0000002a95c9c4f9 <objc_msg_lookup_super+25>:  je     0x2a95c9c600 <objc_msg_lookup_super+288>
> 0x0000002a95c9c4ff <objc_msg_lookup_super+31>:  mov    0x8(%rdi),%r12
> 0x0000002a95c9c503 <objc_msg_lookup_super+35>:  mov    (%rsi),%rdx
> 0x0000002a95c9c506 <objc_msg_lookup_super+38>:  mov    0x40(%r12),%rcx
> 0x0000002a95c9c50b <objc_msg_lookup_super+43>:  mov    %rdx,%rsi
> 0x0000002a95c9c50e <objc_msg_lookup_super+46>:  mov    %edx,%eax
> 0x0000002a95c9c510 <objc_msg_lookup_super+48>:  shr    $0x20,%rsi
> 0x0000002a95c9c514 <objc_msg_lookup_super+52>:  shl    $0x5,%eax
> 0x0000002a95c9c517 <objc_msg_lookup_super+55>:  add    %esi,%eax
> 
> 
> The value in r12 (and rax) is wrong, but I have no idea why.
> 
> 
> Kurt
> 
> 
> 
> -- 
> To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org



Reply to: