-
-
Notifications
You must be signed in to change notification settings - Fork 267
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LDC generates segfaulting code with nested functions #513
Comments
By the way, I've edited the OP to include a reduce test case (instead of the long code I had in the OP). |
Ah, thanks for the comment (editing an issue doesn't trigger a notification on GitHub). This should make the issue much easier to track down, even though there are still Phobos dependencies left. Regarding "older" DMD versions not accepting the code: Does 2.063.2 accept it? If not, it might be a frontend issue that we need to mitigate by also producing an error message. But that's just speculation without having looked at the test case in any detail, it could be a bug in our nested context handling code just as well. |
I should have been more clear, I did mean DMD 2.063.2 rejected it (master works fine.) |
The test for http://d.puremagic.com/issues/show_bug.cgi?id=9578 from dlang/dmd@98a398b
|
Even better, thanks. Hope I will be able to look into this tomorrow or so. |
Okay, so this is a frontend bug fixed in dlang/dmd@98a398b. The reason that the code crashes with LDC is that we pass |
As back-porting changes to central pieces of the frontend is rather risky, I don't think we will fix this until 2.064 is merged. It would be good if we could mitigate this by adding a check similar to that in DMD, though. |
Hm, I don't think I'll be able to resolve this (i.e. mitigate the wrong-code issue to an error messages similar to what DMD 2.063.2 gives) on the weekend – somebody else wants to tackle this? |
Fixed in branch |
Available in release |
Fix logic of pthread type sizes to match C headers.
See this code: http://dpaste.dzfl.pl/f2d04ad8
DMD HEAD compiles this fine, whereas LDC compiles it and it crashes on run.
Older DMD gives a compilation error.
The text was updated successfully, but these errors were encountered: