Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 099c750

Browse files
committed
ubsan: Disable vptr validation on powerpc64.
Should fix sanitizer-ppc64-linux1 bot. git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@247493 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 69470be commit 099c750

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/ubsan/ubsan_type_hash_itanium.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ struct VtablePrefix {
193193
std::type_info *TypeInfo;
194194
};
195195

196-
#if SANITIZER_LINUX
196+
#if SANITIZER_LINUX && !defined(__powerpc64__)
197197
bool isValidVptr(void *Vtable) {
198198
// Validate the memory permissions of the vtable pointer and the first
199199
// function pointer in the vtable. They should be r-- or r-x and r-x
@@ -218,7 +218,7 @@ bool isValidVptr(void *Vtable) {
218218
}
219219
return false;
220220
}
221-
#else // !SANITIZER_LINUX
221+
#else // !SANITIZER_LINUX || __powerpc64__
222222
bool isValidVptr(void *Vtable) {
223223
return true;
224224
}

test/ubsan/lit.common.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,5 @@ if config.host_os == 'Windows':
7878
if config.target_arch.startswith('arm') == False:
7979
config.available_features.add('stable-runtime')
8080

81-
if config.host_os == 'Linux':
81+
if config.host_os == 'Linux' and config.target_arch != 'powerpc64':
8282
config.available_features.add('vptr-validation')

0 commit comments

Comments
 (0)