-
-
Notifications
You must be signed in to change notification settings - Fork 593
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
fix Issue 12044 - Invalid code gen causes segfault #3257
Conversation
This is a regression fix, so please pull, as it is blocking 2.065. |
Could you explain what the problem was and why this fixes it? Otherwise I'm going to have to re-discover the same thing you just did and that seems rather pointless. |
S12044!E s; | ||
} | ||
(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd like to move this case into runnable/link12044.d
. It would make easier to re-run testsuite for future linker-issue fixing.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@WalterBright I don't like to push everything into xtest64.d
.
@yebblies It is name mangling issue on local |
@9rnsr Thanks, it's very helpful to have an explanation like that when what's going on isn't immediately obvious and it's in an area of the compiler I don't know well. |
This is a part of the not yet solid D mangling scheme. Until now, several issues were found - Voldemort Types, the symbols mixed-in by unnamed template mixin, the declared symbols inside unrolled foreach statement, mangling for template instances, etc. And 12044 is comes from the inference of function attributes, return type, and context-ness. So I'm considering to update the mangling scheme to compliant with the extended current language features. |
@9rnsr is right. Attribute inference in FuncDeclaration::semantic3() changes the type of the function, which changes its name mangling (deco). Types constructed before semantic3() is run will have different decos than after. |
|
OK. |
fix Issue 12044 - Invalid code gen causes segfault
Having one test per file doesn't mean we only compile one at once. Each test file could contain a unittest block and the tester tool could build 100s at once. |
fix Issue 12044 - Invalid code gen causes segfault
fix https://d.puremagic.com/issues/show_bug.cgi?id=12044