Skip to content

Fix world update after resolving definition effects in jl_eval_thunk#61349

Merged
c42f merged 1 commit intomasterfrom
caf/definition-effects-world-age-bump
Mar 20, 2026
Merged

Fix world update after resolving definition effects in jl_eval_thunk#61349
c42f merged 1 commit intomasterfrom
caf/definition-effects-world-age-bump

Conversation

@c42f
Copy link
Copy Markdown
Member

@c42f c42f commented Mar 18, 2026

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.

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.)

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.
@c42f c42f requested review from topolarity and vtjnash March 18, 2026 00:20
@c42f c42f merged commit d79443c into master Mar 20, 2026
8 checks passed
@c42f c42f deleted the caf/definition-effects-world-age-bump branch March 20, 2026 08:41
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.

3 participants