Commit 9082da2
Fix CALL_FUNCTION_EX double-free on callee exception
When fn(*args) raised an exception, eval_exception_unwind freed the
cfex_temp_pending buffer, then op_call_function_ex tried to free it
again. Fix: clear cfex_temp_pending before the call so exception
unwind doesn't free it; the normal cleanup path frees it instead.
This fixes assertRaises(exc, fn, *args) crashing - a major blocker
for importing real CPython tests.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9e19af7 commit 9082da2
1 file changed
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
557 | 557 | | |
558 | 558 | | |
559 | 559 | | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
560 | 563 | | |
561 | 564 | | |
562 | 565 | | |
| |||
569 | 572 | | |
570 | 573 | | |
571 | 574 | | |
572 | | - | |
573 | 575 | | |
574 | 576 | | |
575 | 577 | | |
| |||
0 commit comments