Conversation
Member
Author
|
Managed to get a testcase after all. |
vtjnash
reviewed
Feb 21, 2023
Member
vtjnash
left a comment
There was a problem hiding this comment.
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.
Member
Author
|
Yeah, the design could probably be improved. I just wanted to fix the segfault for now. |
Member
Author
|
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.
Member
|
Does this need to be merged? |
Member
|
Seems a rather heavy solution to a problem that should not exist. We made codegen non-recursive to avoid issues like this. |
Member
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.