Skip to content

Commit 58df73b

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)
1 parent 05848b6 commit 58df73b

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
@@ -431,7 +431,9 @@ static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
431431
// with them.
432432
if (Addr) {
433433
Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
434-
if (PtrTy->getPointerAddressSpace() != 0)
434+
auto AS = PtrTy->getPointerAddressSpace();
435+
// Allow for custom addresspaces
436+
if (AS != 0 && AS < 10)
435437
return false;
436438
}
437439

0 commit comments

Comments
 (0)