sleftv conversion: protect some more julia variables from intermediate garbage collections #749
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 should fix one of the crashes observed in oscar-system/Oscar.jl#3184. I did some rr tracing and got a run where garbage collection was triggered by the
jl_box_voidpointer
call which then killed the array where the pointer was supposed to be stored.The crash then happens when julia tries to compile a method instance for a type signature containing an invalid datatype pointer.
For testing it crashes pretty reliably with an explicit garbage collection in the middle:
Once the push is added this crash disappears.
I want to let it run for a bit longer without the explicit collect to make sure the original crash doesn't reappear.
The second
JL_GC_PUSH2
change inlookup_singular_library_symbol_wo_rng
is unrelated to the crashes but I think this is necessary as well.Example backtrace with the explicit collect call: