Skip to content

Commit 70ebb53

Browse files
vchuravyZentrik
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) (cherry picked from commit d0b1303) (cherry picked from commit bd7a76c) (cherry picked from commit 5e712dc) (cherry picked from commit 4a09c40)
1 parent b708aea commit 70ebb53

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
@@ -371,7 +371,9 @@ static bool shouldInstrumentReadWriteFromAddress(const Module *M, Value *Addr) {
371371
// with them.
372372
if (Addr) {
373373
Type *PtrTy = cast<PointerType>(Addr->getType()->getScalarType());
374-
if (PtrTy->getPointerAddressSpace() != 0)
374+
auto AS = PtrTy->getPointerAddressSpace();
375+
// Allow for custom addresspaces
376+
if (AS != 0 && AS < 10)
375377
return false;
376378
}
377379

0 commit comments

Comments
 (0)