Fix world update after resolving definition effects in jl_eval_thunk#61349
Merged
Fix world update after resolving definition effects in jl_eval_thunk#61349
jl_eval_thunk#61349Conversation
PR #60528 removed a world age update after `jl_resolve_definition_effects` as part of a larger refactoring. However `jl_resolve_definition_effects` evaluates selected subexpressions of a thunk - such as the ccall return type - and this may run arbitrary code. Thus a world age update seems required for consistency.
vtjnash
approved these changes
Mar 19, 2026
topolarity
approved these changes
Mar 19, 2026
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.
PR #60528 removed a world age update after
jl_resolve_definition_effectsas part of a larger refactoring. Howeverjl_resolve_definition_effectsevaluates selected subexpressions of a thunk - such as the ccall return type - and this may run arbitrary code. Thus a world age update seems required for consistency.IIUC this is the fix requested in the post-commit review by @vtjnash here https://github.com/JuliaLang/julia/pull/60528/files#r2705468506
(Side note - does anyone have an example of code which isn't actively perverse and where this would be required? I think this is good to have regardless (at least as long as we allow arbitrary code to run "before" running the thunk proper) but I couldn't think of an example where this is required to run clean user code.)