-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Track deletion of merged constants #48742
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
Conversation
|
Managed to get a testcase after all. |
vtjnash
left a comment
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.
Why is there a jl_merge_module call? I think there is a lot more state sometimes destroyed than just this, so I would just say there should not be a merge-modules call, and fallback to the workqueue as designed.
|
Yeah, the design could probably be improved. I just wanted to fix the segfault for now. |
|
Shall we merge this anyway and we can revisit the design in the future? It's be good to fix the immediate segfaults. |
This fixes an intermittent segfault in the Diffractor test. The error very closely depends on the order of events, but essentially what happens is that a GlobalVariable gets stored into mergedConstants, but then deleted in jl_merge_module when the opaque closure module is merged into its parent. A test case is included, but it is quite specific to current codegen, so it'll probably stop being useful the next time we restructure things. It's also intermittent (though would show up under valgrind/asan). Hopefully, it'll nevertheless be useful.
|
Does this need to be merged? |
|
Seems a rather heavy solution to a problem that should not exist. We made codegen non-recursive to avoid issues like this. |
This fixes an intermittent segfault in the Diffractor tests. I tried for a while to come up with a more minimal test case, but failed to do so, because it very closely depends on the order of events, but essentially what happens is that a GlobalVariable gets stored into mergedConstants, but then deleted in jl_merge_module when the opaque closure module is merged into its parent.