fix(includes): ASan 集成支持 + 越界写封堵 + TypePrint 类型名截断 40→255
1. Phase2Translator 增加 TPC_ASAN 支持(opt asan 插桩+链接 -fsanitize=address),配合 clang64 定位 0xbe 崩溃。2. llvmlite/memhub/viperio/viperlib 多处理无界 strcpy/strcat/下溢/递归守卫/栈数组钳制。3. memhub alloc 块尾 canary(MEMBUDDY_CANARY)+check_alive_blocks 校验+chk_stack realloc 扩容。4. TypePrint Ptr(Struct) 类型名截断上限 40→255:含 sha1 前缀类型名(如 bbdf3bbd4c3bc28c.CONSOLE_SCREEN_BUFFER_INFO=42)被截断产生未定义类型引用(llc undefined type)。
This commit is contained in:
1 parent
cb557c84ce
commit
d2d319eb21
10 files changed
+195
-49
No files matched your search
@@ -672,7 +672,7 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
temp[fi] = t.CChar(frac_part % 10 + 48)
|
||||
fi += 1
|
||||
frac_part //= 10
|
||||
while fi < precision:
|
||||
while fi < precision and fi < TEMP_BUF_SIZE - 1:
|
||||
temp[fi] = 48
|
||||
fi += 1
|
||||
while fi > 0 and write_count < size - 1:
|
||||
@@ -835,7 +835,7 @@ def vsnprintf(buf: t.CChar | t.CPtr, size: t.CSizeT, fmt: str, ap: t.CChar | t.C
|
||||
temp[fi] = t.CChar(frac_p % 10 + 48)
|
||||
fi += 1
|
||||
frac_p //= 10
|
||||
while fi < precision:
|
||||
while fi < precision and fi < TEMP_BUF_SIZE - 1:
|
||||
temp[fi] = 48
|
||||
fi += 1
|
||||
while fi > 0 and write_count < size - 1:
|
||||
|
||||
Reference in new issue
Block a user