[dmd-internals] Assertion in the linker on Mac OS X

Jacob Carlborg doob at me.com
Mon May 13 23:54:54 PDT 2013


On May 12, 2013, at 10:53 PM, Michel Fortin <michel.fortin at michelf.ca> wrote:

> You should also check what you're linking with. If you're linking against the custom druntime with Objective-C support (as it happens normally with this test), the culprit may well be in one of those druntime objc support functions too. In this case _dobjc_throwAs_d is referenced (which will convert Objective-C exceptions to D exceptions).
>
> There are other tests in this folder. If you try the objc_selector.d test, it should give you some insight whether the problem has to do with the selector literals. It'll probably fail too, but in this case if you comment out the function calls made through the selector variables (so it won't reference anything special in druntime for exceptions) and you'll have a much more isolated test.
 
I tried compiling the code from the objc_selector.d test. Unmodified I get the linker assertion. If I remove all the calls to the selectors the assertion goes away. I then tried linking with a standard druntime and stubbed out _dobjc_throwAs_d, then I don't get the assertion even when the selectors are called. You might be right that the issue is in fact some code from druntime. I also noted that there is some code that doesn't work, either doesn't compile or asserts in the compiler. I guess I should try and address those first.

--
/Jacob Carlborg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/dmd-internals/attachments/20130514/f60d59d4/attachment.html>


More information about the dmd-internals mailing list