Skip to content

interpreter: pop GC frames when leaving multiple :enter blocks #57186

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

topolarity
Copy link
Member

Resolves #56062

@topolarity topolarity requested a review from Keno January 28, 2025 15:29
@topolarity topolarity added the backport 1.11 Change should be backported to release-1.11 label Jan 28, 2025
@@ -606,8 +609,11 @@ static jl_value_t *eval_body(jl_array_t *stmts, interpreter_state *s, size_t ip,
// equivalent to jl_pop_handler(hand_n_leave), longjmping
// to the :enter code above instead, which handles cleanup
jl_handler_t *eh = ct->eh;
while (--hand_n_leave > 0)
while (--hand_n_leave > 0) {
// pop GC frames for any skipped handlers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last frame doesn't include the PUSH'd frame (at jl_enter_handler(ct, &__eh); above), so I think you may need to move the jl_enter_handler(ct, &__eh); later?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the second-to-last frame though

@topolarity topolarity merged commit 7a97bc9 into JuliaLang:master Jan 28, 2025
8 checks passed
@oscardssmith oscardssmith added bugfix This change fixes an existing bug compiler:interpreter labels Jan 28, 2025
@topolarity topolarity removed the backport 1.11 Change should be backported to release-1.11 label Jan 28, 2025
@topolarity topolarity mentioned this pull request Jan 28, 2025
38 tasks
@topolarity topolarity deleted the ct/interpreter-gcframe branch January 28, 2025 20:27
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bugfix This change fixes an existing bug compiler:interpreter
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertion failure on nightly: scopedvalue + try/catch/finally
4 participants