From 061206f13ee332fdd0046b97e69136f20961dc98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E7=9A=93=E6=99=9F?= <2067144018@qq.com> Date: Sun, 23 Nov 2025 15:40:16 +0800 Subject: [PATCH] [no ci] fix --- src/interpreter/heap.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/interpreter/heap.c b/src/interpreter/heap.c index 440f7098..81373c6a 100644 --- a/src/interpreter/heap.c +++ b/src/interpreter/heap.c @@ -81,13 +81,15 @@ static void ManagedHeap__fire_debug_callback(ManagedHeap* self, ManagedHeapSwpet pk_sprintf(&buf, "auto_thres.free_ratio: %f\n", out_info->auto_thres.free_ratio); c11_sbuf__write_cstr(&buf, DIVIDER); - py_Ref p0 = py_peek(0); py_push(self->debug_callback); py_pushnil(); py_StackRef arg = py_pushtmp(); c11_sbuf__py_submit(&buf, arg); bool ok = py_vectorcall(1, 0); - if(!ok) py_clearexc(p0); // noexcept + if(!ok) { + char* msg = py_formatexc(); + c11__abort("gc_debug_callback error!!\n%s", msg); + } } void ManagedHeap__collect_if_needed(ManagedHeap* self) {