Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-143604: Hold strong reference to executor during JIT tracing#143646

New issue

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

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Fidget-Spinner merged 4 commits intopython:mainfromZheaoli:manjusaka/143604
Jan 10, 2026

Conversation

@Zheaoli
Copy link
Contributor

@ZheaoliZheaoli commentedJan 10, 2026
edited by bedevere-appbot
Loading

Co-authored-by: Ken Jin <kenjin@python.org>Signed-off-by: Manjusaka <me@manjusaka.me>
@Fidget-Spinner
Copy link
Member

Full disclaimer: I wrote the test here and verified it crashes on ASAN on main branch.

@Zheaoli
Copy link
ContributorAuthor

BTW, for the record, when I run./python -m unittest -v test.test_capi.test_opt.TestExecutorInvalidation.test_prev_executor_freed_while_tracing. A new ASAN error has been raised

==3795402==ERROR: LeakSanitizer: detected memory leaksDirect leak of 2040 byte(s) in 1 object(s) allocated from:    #0 0x7fe57ad20cb5 in malloc /usr/src/debug/gcc/gcc/libsanitizer/asan/asan_malloc_linux.cpp:67    #1 0x5647b297e7c9 in _PyMem_RawMalloc Objects/obmalloc.c:64    #2 0x5647b297db5f in _PyMem_DebugRawAlloc Objects/obmalloc.c:2926    #3 0x5647b297dbc8 in _PyMem_DebugRawMalloc Objects/obmalloc.c:2959    #4 0x5647b297f4a6 in _PyMem_DebugMalloc Objects/obmalloc.c:3124    #5 0x5647b29a84bf in PyObject_Malloc Objects/obmalloc.c:1532    #6 0x5647b2c7ece2 in _PyObject_MallocWithType Include/internal/pycore_object_alloc.h:46    #7 0x5647b2c7ece2 in gc_alloc Python/gc.c:2352    #8 0x5647b2c7ef4b in _PyObject_GC_NewVar Python/gc.c:2394    #9 0x5647b2ce92b2 in allocate_executor Python/optimizer.c:1261    #10 0x5647b2cf07ad in make_executor_from_uops Python/optimizer.c:1348    #11 0x5647b2cf143d in uop_optimize Python/optimizer.c:1528    #12 0x5647b2cf266c in _PyOptimizer_Optimize Python/optimizer.c:164    #13 0x5647b2b34772 in stop_tracing_and_jit Python/ceval.c:1461    #14 0x5647b2b7d2aa in _PyEval_EvalFrameDefault Python/generated_cases.c.h:11823    #15 0x5647b2b80d59 in _PyEval_EvalFrame Include/internal/pycore_ceval.h:118    #16 0x5647b2b810c2 in _PyEval_Vector Python/ceval.c:2541    #17 0x5647b28b0877 in _PyFunction_Vectorcall Objects/call.c:413    #18 0x5647b28b6cbf in _PyObject_VectorcallTstate Include/internal/pycore_call.h:136    #19 0x5647b28b6fb1 in method_vectorcall Objects/classobject.c:95    #20 0x5647b28b3f42 in _PyVectorcall_Call Objects/call.c:273    #21 0x5647b28b441e in _PyObject_Call Objects/call.c:348    #22 0x5647b28b4465 in PyObject_Call Objects/call.c:373    #23 0x5647b2b4db07 in _PyEval_EvalFrameDefault Python/generated_cases.c.h:2876    #24 0x5647b2b80d59 in _PyEval_EvalFrame Include/internal/pycore_ceval.h:118    #25 0x5647b2b810c2 in _PyEval_Vector Python/ceval.c:2541    #26 0x5647b28b0877 in _PyFunction_Vectorcall Objects/call.c:413    #27 0x5647b28b37a4 in _PyObject_VectorcallDictTstate Objects/call.c:135    #28 0x5647b28b3bb1 in _PyObject_Call_Prepend Objects/call.c:504    #29 0x5647b29f04b2 in call_method Objects/typeobject.c:3088    #30 0x5647b29f0684 in slot_tp_call Objects/typeobject.c:10681

I'm trying to figure it out why

@Fidget-Spinner
Copy link
Member

Fidget-Spinner commentedJan 10, 2026
edited
Loading

I'm trying to figure it out why

Oops, I was testing this locally and also saw the ASAN leak so I fixed it. There's no more leak now.

Zheaoli reacted with heart emoji

@Zheaoli
Copy link
ContributorAuthor

Oops, I was testing this locally and also saw the ASAN leak so I fixed it. There's no more leak now.

LOL, Thanks for the new commit. Actually I have never think about this part yet. Thanks for the leason #TIL

@Fidget-SpinnerFidget-Spinner merged commite2f0160 intopython:mainJan 10, 2026
70 checks passed
reidenong pushed a commit to reidenong/cpython that referenced this pull requestJan 12, 2026
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@Fidget-SpinnerFidget-SpinnerFidget-Spinner left review comments

@ericsnowcurrentlyericsnowcurrentlyAwaiting requested review from ericsnowcurrentlyericsnowcurrently is a code owner

@markshannonmarkshannonAwaiting requested review from markshannonmarkshannon is a code owner

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@Zheaoli@Fidget-Spinner

[8]ページ先頭

©2009-2026 Movatter.jp