[PATCH] D148163: [compiler-rt] [test] [ubsan] Mark failing tests as unsupported for mingw configs

Martin Storsjö via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 12 13:28:24 PDT 2023


mstorsjo created this revision.
mstorsjo added reviewers: phosek, alvinhochun, vitalybuka.
Herald added subscribers: Enna1, dberris.
Herald added a project: All.
mstorsjo requested review of this revision.
Herald added a project: Sanitizers.
Herald added a subscriber: Sanitizers.

All of these are already unsupported for MSVC style configs. For
some cases, simplify the regex to match any windows triple, while
for others, mention windows-msvc and windows-gnu specifically,
if they are separate cases that happen to fail for different reasons.

-fsanitize=function is unsupported both in mingw and MSVC modes.

The vptr tests expect to get demangled C++ type info names, but
Itanium C++ typenames don't get demangled by ubsan on Windows.

The test that tries to build a .so doesn't work as such on
Windows.

While mingw toolchains do support weak symbols, the relevant
sanitizer symbols aren't made weak on Windows.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D148163

Files:
  compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
  compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
  compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
  compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
  compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp


Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
+++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr.cpp
@@ -44,6 +44,10 @@
 // UNSUPPORTED: target={{.*openbsd.*}}
 // Compilation error
 // UNSUPPORTED: target={{.*freebsd.*}}
+// For MinGW targets, the vptr tests do generally work, but Itanium demangling
+// isn't done for the type names. The "(echo ..." line fails to be handled by
+// the shell.
+// UNSUPPORTED: target={{.*windows-gnu.*}}
 #include <new>
 #include <typeinfo>
 #include <assert.h>
Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
+++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-virtual-base.cpp
@@ -6,6 +6,8 @@
 // UNSUPPORTED: target={{.*windows-msvc.*}}
 // Nested crash reported
 // UNSUPPORTED: target={{.*freebsd.*}}
+// Itanium demangling isn't done for the type names.
+// UNSUPPORTED: target={{.*windows-gnu.*}}
 
 struct S { virtual int f() { return 0; } };
 struct T : virtual S {};
Index: compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
+++ compiler-rt/test/ubsan/TestCases/TypeCheck/vptr-non-unique-typeinfo.cpp
@@ -3,7 +3,7 @@
 // RUN: %run %t
 //
 // REQUIRES: cxxabi
-// UNSUPPORTED: target={{.*windows-msvc.*}}
+// UNSUPPORTED: target={{.*windows.*}}
 
 struct X {
   virtual ~X() {}
Index: compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
+++ compiler-rt/test/ubsan/TestCases/TypeCheck/Function/function.cpp
@@ -4,7 +4,7 @@
 // RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK $(%run %t-unique UNIQUE)
 // Verify that we can disable symbolization if needed:
 // RUN: %env_ubsan_opts=symbolize=0 %run %t 2>&1 | FileCheck %s --check-prefix=NOSYM $(%run %t-unique NOSYM-UNIQUE)
-// XFAIL: target={{.*windows-msvc.*}}
+// XFAIL: target={{.*windows.*}}
 // Unsupported function flag
 // UNSUPPORTED: target={{.*openbsd.*}}
 
Index: compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
===================================================================
--- compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
+++ compiler-rt/test/ubsan/TestCases/Misc/monitor.cpp
@@ -4,7 +4,7 @@
 // __ubsan_on_report is not defined as weak. Redefining it here isn't supported
 // on Windows.
 //
-// UNSUPPORTED: target={{.*windows-msvc.*}}
+// UNSUPPORTED: target={{.*windows.*}}
 // Linkage issue
 // XFAIL: target={{.*openbsd.*}}
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148163.512956.patch
Type: text/x-patch
Size: 2871 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/e9e0aa37/attachment.bin>


More information about the llvm-commits mailing list