Skip to content
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 DtoCreateNestedContextType() for -linkonce-templates #3766

Merged
merged 1 commit into from
Jun 21, 2021

Conversation

kinke
Copy link
Member

@kinke kinke commented Jun 18, 2021

Fixes #3690.

@kinke
Copy link
Member Author

kinke commented Jun 18, 2021

I can confirm that this fixes the issue for the executable mentioned in #3763 (comment). So both -link-defaultlib-shared and -linkonce-templates seem to work fine for a complex project on Windows now ('seem' because I haven't extensively tested it yet).

@kinke
Copy link
Member Author

kinke commented Jun 19, 2021

I haven't fully analyzed what happened before this change (generating the -vv output took something like half an hour on a fast box (as the issue only showed up when compiling the front-end all-at-once), and grepping an absolute horror due to https://issues.dlang.org/show_bug.cgi?id=21387), but seeing that irFunc.nestedContextCreated is set right before recursively walking up the parents hierarchy seemed dangerous wrt. reentrancy for the original function.

Crafting an according testcase would probably take significant effort.

@kinke kinke merged commit 56b2902 into ldc-developers:master Jun 21, 2021
@kinke kinke deleted the fix3690 branch June 21, 2021 19:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v1.25+: -linkonce-templates miscompiles wrt. nested lambdas
2 participants