From 344ea1cd4ba43de8222bda481d567c9d3e992a15 Mon Sep 17 00:00:00 2001 From: Niko1221 Date: Wed, 7 Oct 2026 09:59:30 +0200 Subject: [PATCH] tools: check_isa_guard flags std:: instantiations only inside the wide-ISA objects --- tools/check_isa_guard.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/check_isa_guard.py b/tools/check_isa_guard.py index 384e8a35..16e66c96 100644 --- a/tools/check_isa_guard.py +++ b/tools/check_isa_guard.py @@ -171,7 +171,8 @@ def run_pe(path, mapf): for (b, sym, obj), (n, first, guarded) in sorted(wide.items()): why = judge(sym, obj.split(":")[-1], "", guarded, False, False) # an inline function defined in a header comes out of the map as `f i`; the wide-ISA files must have none - if why is None and re.search(r"std@@|\?\$", sym) and not ("?A0x" in sym): + in_wide_obj = any(o in obj for o in WIDE_OBJECTS) + if why is None and in_wide_obj and not guarded and re.search(r"std@@|\?\$", sym) and not ("?A0x" in sym): why = "template / std:: instantiation inside a wide-ISA object (COMDAT: the linker may share it)" if why: bad.append((sym, n, first, why + " [rva %x, %s]" % (b, obj)))