[compiler-rt] [compiler-rt] Adjust ASan Windows tests for mingw-w64 (PR #216585)

via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 18 02:57:07 PDT 2026


================
@@ -13,7 +13,9 @@ int main() {
   return x[5];
   // CHECK: heap-use-after-free
   // CHECK: free
-  // CHECK: main{{.*}}fuse-lld.cpp:[[@LINE-4]]:3
+  // MSVC: main{{.*}}fuse-lld.cpp:[[@LINE-4]]:3
+  // MINGW: {{.*fuse-lld.cpp.tmp.exe\+0x14000[0-9a-f]+}}
----------------
oltolm wrote:

I looked again at why the two sets of of assertions were necessary and now I know. When I was fixing the tests I only cared about making them pass on Mingw. It is possible to change the test in way that makes the assertions the same for MSVC and MINGW. I will have a patch ready later today.

I asked Codex about it and got this reply.

---

Almost. Both stem from MinGW ld.lld’s default -debug:dwarf mode, but through different effects:
- unsymbolized.cpp: the unexpected function names came from the emitted COFF symbol table, not DWARF. -s removes both the symbol table and debug sections.
- fuse-lld.cpp: embedded DWARF from MinGW runtime objects caused llvm-symbolizer to choose DWARF instead of the valid PDB. -S removes that DWARF while retaining the PDB.

---

So Mingw clang does support symbolization using `llvm-symbolizer` and `unsymbolize.cpp` was explicitly testing the case where no debug or symbol info is available.

https://github.com/llvm/llvm-project/pull/216585


More information about the llvm-commits mailing list