Skip to content

Commit e641309

Browse files
committed
Allow for custom address spaces
Julia uses addressspaces for GC and we want these to be sanitized as well. (cherry picked from commit 3f53397) (cherry picked from commit 58df73b)
1 parent a5ccdfb commit e641309

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,9 @@ static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
375375
// with them.
376376
if (Addr) {
377377
Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
378-
if (PtrTy->getPointerAddressSpace() != 0)
378+
auto AS = PtrTy->getPointerAddressSpace();
379+
// Allow for custom addresspaces
380+
if (AS != 0 && AS < 10)
379381
return false;
380382
}
381383

0 commit comments

Comments
 (0)