[compiler-rt] r247493 - ubsan: Disable vptr validation on powerpc64.

Peter Collingbourne via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 17:08:29 PDT 2015


Author: pcc
Date: Fri Sep 11 19:08:28 2015
New Revision: 247493

URL: http://llvm.org/viewvc/llvm-project?rev=247493&view=rev
Log:
ubsan: Disable vptr validation on powerpc64.

Should fix sanitizer-ppc64-linux1 bot.

Modified:
    compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
    compiler-rt/trunk/test/ubsan/lit.common.cfg

Modified: compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc?rev=247493&r1=247492&r2=247493&view=diff
==============================================================================
--- compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc (original)
+++ compiler-rt/trunk/lib/ubsan/ubsan_type_hash_itanium.cc Fri Sep 11 19:08:28 2015
@@ -193,7 +193,7 @@ struct VtablePrefix {
   std::type_info *TypeInfo;
 };
 
-#if SANITIZER_LINUX
+#if SANITIZER_LINUX && !defined(__powerpc64__)
 bool isValidVptr(void *Vtable) {
   // Validate the memory permissions of the vtable pointer and the first
   // function pointer in the vtable. They should be r-- or r-x and r-x
@@ -218,7 +218,7 @@ bool isValidVptr(void *Vtable) {
   }
   return false;
 }
-#else  // !SANITIZER_LINUX
+#else  // !SANITIZER_LINUX || __powerpc64__
 bool isValidVptr(void *Vtable) {
   return true;
 }

Modified: compiler-rt/trunk/test/ubsan/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/ubsan/lit.common.cfg?rev=247493&r1=247492&r2=247493&view=diff
==============================================================================
--- compiler-rt/trunk/test/ubsan/lit.common.cfg (original)
+++ compiler-rt/trunk/test/ubsan/lit.common.cfg Fri Sep 11 19:08:28 2015
@@ -78,5 +78,5 @@ if config.host_os == 'Windows':
 if config.target_arch.startswith('arm') == False:
   config.available_features.add('stable-runtime')
 
-if config.host_os == 'Linux':
+if config.host_os == 'Linux' and config.target_arch != 'powerpc64':
   config.available_features.add('vptr-validation')




More information about the llvm-commits mailing list