Le 21 juin 2011 à 15:06, David Chisnall a écrit :

> I'm having a bit of difficulty working out exactly what is the bit that is 
> wrong in your test case.  Can you try to put together a reduced test case?  
> My suspicion is that it's somehow related to the handling of unions.  
> NSMapTable uses unions of the OpenStep-style pointer functions structure and 
> the OS X 10.5-style NSPointerFunctions object in various places, and there's 
> a lot of potential for stuff to go wrong there due to weirdness in the Linux 
> ABI for unions.

I'm still trying to create a reduced test case that doesn't depend on 
Foundation, but it's quite hard… If I don't use Foundation, a simple standalone 
class roughly similar to NSConcretePointerFunctions doesn't exhibit the same 
issue. 

If I use Foundation and tweak -initWithOptions: in the original class, the bug 
can disappear by rearranging the statements inside -initWithOptions: or even a 
adding new statement such as 'assert(options == 
NSPointerFunctionsOpaqueMemoryOption)'. For example, the arguments are not 
corrupted if I add this assertion, this is quite weird.

So I probably have to create a class that very closely mimics 
NSConcretePointerFunctions without depending on Foundation… unless you have a 
better suggestion?

Thanks,
Quentin.
_______________________________________________
Etoile-dev mailing list
Etoile-dev@gna.org
https://mail.gna.org/listinfo/etoile-dev

Reply via email to