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.

(cherry picked from commit 3f53397)
  • Loading branch information
vchuravy committed Feb 7, 2022
1 parent 05848b6 commit 58df73b
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 58df73b

Please sign in to comment.