OS X 10.7 (Lion) breaks DMD-compiled executables due to ASLR (?)

David Nadlinger see at klickverbot.at
Sun Jul 24 16:26:02 PDT 2011


On 7/25/11 12:48 AM, KennyTM~ wrote:
> On Jul 24, 11 13:24, David Nadlinger wrote:
>> I have been observing crashes in semi-random places around my D
>> applications (Segmentation fault/Bus errors) on the recently released OS
>> X 10.7, dubbed Lion. They miraculously disappeared every time I ran the
>> executables from GDB, and as I found out (thanks wm4 for the hint), this
>> was due to GDB disabling ASLR by default. And indeed, if I »set
>> disable-aslr off«, the crashes also happened within the debugger.
>>
>> This is not totally surprising as Lion is the first OS X release to
>> include full ASLR for both 32 bit and 64 bit applications, but I have
>> not been able to track down what exactly goes on.
>>
>> Any guesses what could go wrong here without additional details (I'm not
>> at all sure where to look right now)? Maybe something related to the OS
>> X-specific things like TLS handling?
>>
>> David
>
> Seems to be due to throwing exceptions, not TLS.
>
> http://d.puremagic.com/issues/show_bug.cgi?id=6376

Yeah, can confirm that, all my issues seem to be somehow related to 
exceptions to (even though in non-obvious ways sometimes).

David


More information about the Digitalmars-d mailing list