Skip to content

Commit 3f53397

Browse files
committed
Allow for custom address spaces
Julia uses addressspaces for GC and we want these to be sanitized as well.
1 parent 359a31d commit 3f53397

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
@@ -401,7 +401,9 @@ static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
401401
// with them.
402402
if (Addr) {
403403
Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
404-
if (PtrTy->getPointerAddressSpace() != 0)
404+
auto AS = PtrTy->getPointerAddressSpace();
405+
// Allow for custom addresspaces
406+
if (AS != 0 && AS < 10)
405407
return false;
406408
}
407409

0 commit comments

Comments
 (0)