[PATCH] D37986: [ubsan] Fix interface_symbols_windows

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 11:26:46 PDT 2017


vitalybuka updated this revision to Diff 115690.
vitalybuka added a comment.

undo unneeded resort


https://reviews.llvm.org/D37986

Files:
  compiler-rt/lib/ubsan/ubsan_interface.inc
  compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.c
  compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
  compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.c
  compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc
  compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.c
  compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc


Index: compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc
===================================================================
--- compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc
+++ compiler-rt/test/asan/TestCases/Windows/interface_symbols_windows.cc
@@ -39,6 +39,7 @@
 // IMPORT: __asan_unhandled_exception_filter
 // IMPORT: __asan_test_only_reported_buggy_pointer
 // IMPORT: __sancov_lowest_stack
+// IMPORT: __ubsan_vptr_type_cache
 //
 // RUN: cat %t.imports1 %t.imports2 %t.imports3 | sort | uniq > %t.imports-sorted
 // RUN: cat %t.exports | sort | uniq > %t.exports-sorted
Index: compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc
===================================================================
--- compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc
+++ compiler-rt/test/asan/TestCases/Linux/interface_symbols_linux.cc
@@ -1,11 +1,10 @@
 // Check the presence of interface symbols in compiled file.
 
-// RUN: %clang_asan -O2 %s -o %t.exe
+// RUN: %clangxx_asan -O2 %s -o %t.exe
 // RUN: nm -D %t.exe | grep " [TWw] "                                          \
 // RUN:  | grep -o "\(__asan_\|__ubsan_\|__sancov_\|__sanitizer_\)[^ ]*"       \
 // RUN:  | grep -v "__sanitizer_syscall"                                       \
 // RUN:  | grep -v "__sanitizer_weak_hook"                                     \
-// RUN:  | grep -v "__ubsan_handle_dynamic_type_cache_miss"                    \
 // RUN:  | grep -v "__sancov_lowest_stack"                                     \
 // RUN:  | sed -e "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \
 // RUN:  > %t.exports
Index: compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
===================================================================
--- compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
+++ compiler-rt/test/asan/TestCases/Darwin/interface_symbols_darwin.cc
@@ -2,16 +2,15 @@
 // If you're changing this file, please also change
 // ../Linux/interface_symbols.c
 
-// RUN: %clang_asan -dead_strip -O2 %s -o %t.exe
+// RUN: %clangxx_asan -dead_strip -O2 %s -o %t.exe
 //
 // note: we can not use -D on Darwin.
 // RUN: nm -g `%clang_asan %s -fsanitize=address -### 2>&1 | grep "libclang_rt.asan_osx_dynamic.dylib" | sed -e 's/.*"\(.*libclang_rt.asan_osx_dynamic.dylib\)".*/\1/'` \
 // RUN:  | grep " [TU] "                                                       \
 // RUN:  | grep -o "\(__asan_\|__ubsan_\|__sancov_\|__sanitizer_\)[^ ]*"       \
 // RUN:  | grep -v "__sanitizer_syscall"                                       \
 // RUN:  | grep -v "__sanitizer_weak_hook"                                     \
 // RUN:  | grep -v "__sanitizer_mz"                                            \
-// RUN:  | grep -v "__ubsan_handle_dynamic_type_cache_miss"                    \
 // RUN:  | grep -v "__sancov_lowest_stack"                                     \
 // RUN:  | sed -e "s/__asan_version_mismatch_check_v[0-9]+/__asan_version_mismatch_check/" \
 // RUN:  > %t.exports
Index: compiler-rt/lib/ubsan/ubsan_interface.inc
===================================================================
--- compiler-rt/lib/ubsan/ubsan_interface.inc
+++ compiler-rt/lib/ubsan/ubsan_interface.inc
@@ -16,6 +16,8 @@
 INTERFACE_FUNCTION(__ubsan_handle_cfi_check_fail_abort)
 INTERFACE_FUNCTION(__ubsan_handle_divrem_overflow)
 INTERFACE_FUNCTION(__ubsan_handle_divrem_overflow_abort)
+INTERFACE_FUNCTION(__ubsan_handle_dynamic_type_cache_miss)
+INTERFACE_FUNCTION(__ubsan_handle_dynamic_type_cache_miss_abort)
 INTERFACE_FUNCTION(__ubsan_handle_float_cast_overflow)
 INTERFACE_FUNCTION(__ubsan_handle_float_cast_overflow_abort)
 INTERFACE_FUNCTION(__ubsan_handle_function_type_mismatch)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37986.115690.patch
Type: text/x-patch
Size: 3762 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170918/a4a50435/attachment.bin>


More information about the llvm-commits mailing list