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 Sep 29, 2021
1 parent 13b5899 commit 9ef91df
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 @@ -431,7 +431,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 9ef91df

Please sign in to comment.