mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
[tsan] fix PR18146: sometimes a variable written into vptr could have an integer type (after other optimizations)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@196507 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -408,10 +408,12 @@ bool ThreadSanitizer::instrumentLoadOrStore(Instruction *I) {
|
||||
if (isa<VectorType>(StoredValue->getType()))
|
||||
StoredValue = IRB.CreateExtractElement(
|
||||
StoredValue, ConstantInt::get(IRB.getInt32Ty(), 0));
|
||||
if (StoredValue->getType()->isIntegerTy())
|
||||
StoredValue = IRB.CreateIntToPtr(StoredValue, IRB.getInt8PtrTy());
|
||||
// Call TsanVptrUpdate.
|
||||
IRB.CreateCall2(TsanVptrUpdate,
|
||||
IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()),
|
||||
IRB.CreateBitCast(StoredValue, IRB.getInt8PtrTy()));
|
||||
IRB.CreatePointerCast(StoredValue, IRB.getInt8PtrTy()));
|
||||
NumInstrumentedVtableWrites++;
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user