fix(tools): 审计不再跳过参考实现失败的 pt 记录

This commit is contained in:
TermiNexus committed 2026-10-21 04:26:22 +08:00
1 parent 4cccc084be
commit 2ce2fd0363
1 file changed
+3 -1
+3 -1
View File
@@ -233,7 +233,9 @@ function ScanFile(File) {
continue;
}
for (const R of (Decoded && Decoded.Records) || []) {
if (String(R.MethodId) !== PT_METHOD || R.Bad || R.At === undefined || R.Consumed === undefined) continue;
// 注意:不要因为 R.Bad 就跳过——semantic 在同一个 pt 记录上失败,恰恰是我们要审计的对象;
// 只要拿到了 At/BitStart 就独立重解一遍(否则审计会被参考实现的失败“静音”)。
if (String(R.MethodId) !== PT_METHOD || R.At === undefined || R.BitStart === undefined) continue;
const Label = path.basename(path.dirname(File)) + '/' + path.basename(File);
AuditPt(Body, R.At + 16, path.basename(File), R.BitStart, Label);
}