Skip to content

Commit

Permalink
Allow for custom address spaces
Browse files Browse the repository at this point in the history
Julia uses addressspaces for GC and we want these to be sanitized as well.
  • Loading branch information
vchuravy committed Oct 1, 2021
1 parent 359a31d commit 3f53397
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion llvm/lib/Transforms/Instrumentation/ThreadSanitizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,9 @@ static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
// with them.
if (Addr) {
Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
if (PtrTy->getPointerAddressSpace() != 0)
auto AS = PtrTy->getPointerAddressSpace();
// Allow for custom addresspaces
if (AS != 0 && AS < 10)
return false;
}

Expand Down

0 comments on commit 3f53397

Please sign in to comment.