From e48f2104ff0db5defdea63c996e46ae05fbbaef0 Mon Sep 17 00:00:00 2001 From: TermiNexus Date: Tue, 25 Aug 2026 15:47:04 +0800 Subject: [PATCH] =?UTF-8?q?feat(memhub):=20[DET]=20=E8=B6=8A=E7=95=8C?= =?UTF-8?q?=E5=86=99=E6=89=93=E5=8D=B0=E5=9D=97=E5=86=85=E5=AE=B9=E5=89=8D?= =?UTF-8?q?16=E5=AD=97=E8=8A=82=20-=20=E5=AE=9A=E4=BD=8D=20size=3D7=20?= =?UTF-8?q?=E5=9D=97=E8=A2=AB=E8=B6=8A=E7=95=8C=E5=86=99=E7=9A=84=E5=86=99?= =?UTF-8?q?=E5=85=A5=E8=80=85=EF=BC=88=E6=89=AB=E6=8F=8F=20includes=20?= =?UTF-8?q?=E9=98=B6=E6=AE=B5=EF=BC=8C=E5=90=8E=E6=A0=87=E8=AE=B0=E8=A2=AB?= =?UTF-8?q?=E5=86=99=200x0000=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- includes/memhub.vp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/includes/memhub.vp b/includes/memhub.vp index 07f0ce0..a3b9dcd 100644 --- a/includes/memhub.vp +++ b/includes/memhub.vp @@ -883,8 +883,14 @@ class MemBuddy(MemManager): m16: t.CUInt16T | t.CPtr = (t.CUInt16T | t.CPtr)(t.CVoid(p + s, t.CPtr)) mv: t.CUInt16T = m16[0] if mv != t.CUInt16T(MEMBUDDY_DET_MARKER): - stdio.printf("[DET] 越界写: ptr=%llu size=%llu 后标记=0x%04X(期望 0xCDCD)\n", + stdio.printf("[DET] 越界写: ptr=%llu size=%llu 后标记=0x%04X(期望 0xCDCD)块内容前16B: ", p, s, t.CUInt32T(mv)) + bi3: t.CInt = 0 + while bi3 < 16: + bv3: t.CUInt8T = (t.CUInt8T | t.CPtr)(t.CVoid(p + t.CUInt64T(bi3), t.CPtr))[0] + stdio.printf("%02X ", t.CUInt32T(bv3)) + bi3 += 1 + stdio.printf("\n") stdlib.exit(1) i += 1