Skip to content

Commit 0debc4a

Browse files
vchuravymaleadt
authored andcommitted
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 1642111 commit 0debc4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp

+3-1
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)