diff --git a/App/lib/Stub/StubGen/VpiReader.vp b/App/lib/Stub/StubGen/VpiReader.vp index 5600dad..3acb895 100644 --- a/App/lib/Stub/StubGen/VpiReader.vp +++ b/App/lib/Stub/StubGen/VpiReader.vp @@ -1803,6 +1803,11 @@ def _ParseVpiIntoModuleImpl(pool: memhub.MemBuddy*, mod: mlirlite.LLVMModule*, v # Likewise cache param annotations (tree param lists may be truncated; # _inject_*_declare uses this cache to complete declare param counts). _cache_vpi_param_annots_text(vpi_buf, src_sha1) + # v3 逃逸摘要必须**在所有 vpi 加载点**都喂一份:_ensure_vpi_ret_annot_loaded 开头有 + # "本模块 ret 注解已缓存 → 直接 return 1" 的短路,若某模块先经本函数(stub 注入) + # 加载、而这里没喂逃逸缓存,后续跨模块逃逸查询就会永久命中不到(现场:EscapeXmodTest + # 漏检——box.vpi 里 `# esc=2` 明明写对了,查询侧却查空)。 + _cache_vpi_escape_annots_text(vpi_buf, src_sha1) # 3. walk top-level AST nodes ch: list[ast.AST*]* = tree.children