[SVN] Re: [Patches] TM::Executor additions

Alex Ross tm-alex at rosiba.com
Fri Mar 27 17:02:37 UTC 2009


On Mar 26, 2009, at 9:32 PM, Luke Daley wrote:

> On 27/03/2009, at 1:20 PM, Alex Ross wrote:
>
>> On Mar 26, 2009, at 5:48 PM, Luke Daley wrote:
>>
>>> On 27/03/2009, at 10:41 AM, Alex Ross wrote:
>>>
>>>>> What are the problems with it though? Are they bugs in
>>>>> tm_interactive_input.dylib?
>>>>
>>>> Yes, tm_interactive_input.dylib is causing some python programs to
>>>> crash mysteriously.  Something to do with flat-namespacing.
>>>
>>> Oh yes, I remember now.
>>>
>>> Allan noted me something about that but it's gone now.
>>>
>>> Now that we use a different mechanism to override the system's
>>> implementation of the functions we hijack we were going to try not
>>> flattening the namespace.
>>>
>>> Did anyone try that?
>>
>> I have no idea how… I thought you were going to do it!
>
> Ok, can someone give me some python and some instructions on how to
> induce the bug?

The bug occurs when trying to use the “pyglet” module.  But even  
better, allan was able to reduce it to a C program:

http://pastie.textmate.org/429083

You can run the program in Terminal:

g++ -include cstdio untitled.cc && ./a.out
0x400260, 0x4077f0

But in TextMate the program prints:
0x100580, 0x0

If you switch the order of the dlopens, you'll have a similar result.

Changing RTLD_LOCAL to RTLD_GLOBAL makes it work, so allan suggests  
possibly patching dlopen to always load GLOBAL.

—Alex




More information about the textmate-dev mailing list