ubsan: Disable vptr validation on powerpc64.
authorPeter Collingbourne <peter@pcc.me.uk>
Sat, 12 Sep 2015 00:08:28 +0000 (00:08 +0000)
committerPeter Collingbourne <peter@pcc.me.uk>
Sat, 12 Sep 2015 00:08:28 +0000 (00:08 +0000)
Should fix sanitizer-ppc64-linux1 bot.

llvm-svn: 247493

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

index 170da2c..3687c53 100644 (file)
@@ -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;
 }
index 2e0a0bc..92d998b 100644 (file)
@@ -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')