[compiler-rt] [compiler-rt] [test] Work around MS CRT stdio format quirks on mingw too (PR #93787)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 01:40:39 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Martin Storsjö (mstorsjo)
<details>
<summary>Changes</summary>
So far, these tests have been disabled in mingw build configurations (built as asan-dynamic), but these were enabled in 246234ac70faa1e3281a2bb83dfc4dd206a7d59c, exposing the issue.
(That commit is currently reverted, but will probably be relanded in some form soon.)
---
Full diff: https://github.com/llvm/llvm-project/pull/93787.diff
2 Files Affected:
- (modified) compiler-rt/test/asan/TestCases/debug_double_free.cpp (+2-2)
- (modified) compiler-rt/test/asan/TestCases/debug_report.cpp (+2-2)
``````````diff
diff --git a/compiler-rt/test/asan/TestCases/debug_double_free.cpp b/compiler-rt/test/asan/TestCases/debug_double_free.cpp
index de5ac7b0c8d5c..d7c59f8b41236 100644
--- a/compiler-rt/test/asan/TestCases/debug_double_free.cpp
+++ b/compiler-rt/test/asan/TestCases/debug_double_free.cpp
@@ -7,9 +7,9 @@
// FIXME: Doesn't work with DLLs
// XFAIL: win32-dynamic-asan
-// If we use %p with MSVC, it comes out all upper case. Use %08x to get
+// If we use %p with MS CRTs, it comes out all upper case. Use %08x to get
// lowercase hex.
-#ifdef _MSC_VER
+#ifdef _WIN32
# ifdef _WIN64
# define PTR_FMT "0x%08llx"
# else
diff --git a/compiler-rt/test/asan/TestCases/debug_report.cpp b/compiler-rt/test/asan/TestCases/debug_report.cpp
index 617b7ee91e18d..d02ce50312226 100644
--- a/compiler-rt/test/asan/TestCases/debug_report.cpp
+++ b/compiler-rt/test/asan/TestCases/debug_report.cpp
@@ -22,9 +22,9 @@ int main() {
return 0;
}
-// If we use %p with MSVC, it comes out all upper case. Use %08x to get
+// If we use %p with MS CRTs, it comes out all upper case. Use %08x to get
// lowercase hex.
-#ifdef _MSC_VER
+#ifdef _WIN32
# ifdef _WIN64
# define PTR_FMT "0x%08llx"
# else
``````````
</details>
https://github.com/llvm/llvm-project/pull/93787
More information about the llvm-commits
mailing list