-
-
Notifications
You must be signed in to change notification settings - Fork 34.3k
Open
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
void
_Py_uop_abstractcontext_fini(JitOptContext *ctx)
{
if (ctx == NULL) {
return;
}
ctx->curr_frame_depth = 0;
int tys = ctx->t_arena.ty_curr_number;
for (int i = 0; i < tys; i++) {
JitOptSymbol *sym = &ctx->t_arena.arena[i];
if (sym->tag == JIT_SYM_KNOWN_VALUE_TAG) {
Py_CLEAR(sym->value.value);
}
}
}
It seems we are not freeing the recorded values when finalizing the abstract interpreter.
The fix is simple: just add a case there to check for the recorded value tag and Py_CLEAR it.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
interpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error