Hi David
I'm compiling the runtime with gcc, but it still could be a LLVM optimisation
as the calling code is generated with LLVM in edlc. I can open Gorm with no
problems, but it was compiled with GCC, so it looks like it could be clang/LLVM.
The isa variables of the pool object and the anObject parameter in
NSAutoreleasePool are all pointing to 0xbf30cffc, and when I do a
objc_lookup_class on anything, it fails with "cannot access memory at address
0xbf30cffc":
(gdb) p NSZombie
Cannot access memory at address 0xbf30cffc
(gdb) p objc_lookup_class("NSZombie")
Cannot access memory at address 0xbf30cffc
(gdb) p (void*)objc_lookup_class("NSZombie")
Cannot access memory at address 0xbf30cffc
(gdb) p objc_lookup_class
$3 = {id (const char *)} 0xb75341d0 <objc_lookup_class>
(gdb) p objc_lookup_class("NSAutoreleasePool")
Cannot access memory at address 0xbf30cffc
I'm going to update LLVM again and see how it goes.
Cheers
Chris
On 13/12/2010, at 04:42 AM, David Chisnall wrote:
> On 11 Dec 2010, at 21:27, Christopher Armstrong wrote:
>
>> It wouldn't happen to be related to this, would it?
>>
>> http://savannah.gnu.org/bugs/?31830
>
> It's possible. I can't reproduce that. The problem there is that NSObject
> is sending a message to NSZombie in its initalize method. For some reason,
> the runtime is not finding the method for [NSZombie class], so is invoking
> the forwarding mechanism. The forwarding mechanism generates some
> autoreleased objects, but autoreleasing doesn't work until NSObject's
> +initialize has finished running.
>
> The thing I don't understand is why it can't find the method for [NSZombie
> +class]. It appears to be finding the NSZombie class. Maybe you could take
> a look at the class structure and dtable and see if you can find what's wrong?
>
> David
>
> P.S. Did you compile libobjc2 with clang? There was a strange bug in one of
> the LLVM optimisations that I haven't tracked down yet that was causing it to
> do nonsense instead of a sane dtable lookup.
>
> -- Sent from my Cray X1
>
>
> _______________________________________________
> Etoile-discuss mailing list
> [email protected]
> https://mail.gna.org/listinfo/etoile-discuss
--------
Christopher Armstrong
[email protected]
_______________________________________________
Etoile-discuss mailing list
[email protected]
https://mail.gna.org/listinfo/etoile-discuss