fix(memhub): MEMDBG 改为运行期开关 _memdbg_enable,BuddyTest 入口关闭

This commit is contained in:
TermiNexus committed 2026-09-09 08:55:49 +08:00
1 parent 4a8d8f34c0
commit 0bfbcdd028
2 files changed
+26 -3

No files matched your search

+6
View File
@@ -2,6 +2,7 @@ from stdint import *
import w32.win32console
import t, c
from t import CInt, CExport
import memhub
import mbuddytest
@@ -9,4 +10,9 @@ def main() -> CInt | CExport:
w32.win32console.SetConsoleCP(65001)
w32.win32console.SetConsoleOutputCP(65001)
# memhub 的 [MEMDBG] 悬空/重复 free 检测默认开启(_memdbg_enable=1)。
# BuddyTest 含"故意双重 free,期望静默拒绝且状态不损坏"的负向用例,
# 若保持开启会在第二次 free 处终止进程 → 在此关闭 debug 模式。
memhub._memdbg_enable = 0
return mbuddytest.mbuddy_main()