We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Originally reported on Google Code with ID 3
LLVM r159521 % cat tsan-bug.cc struct AAA { virtual long aaa (); }; struct BBB: virtual AAA { unsigned long bbb; }; struct CCC: virtual AAA { }; struct DDD: CCC, BBB { DDD (); }; DDD::DDD() { } % clang -O2 -c -fthread-sanitizer tsan-bug.cc clang: /home/kcc/llvm/lib/VMCore/Constants.cpp:1366: static llvm::Constant *llvm::ConstantExpr::getCast(unsigned int, llvm::Constant *, llvm::Type *): Assertion `CastInst::castIsValid(opc, C, Ty) && "Invalid constantexpr cast!"' failed. The assertion happens here: bool ThreadSanitizer::instrumentLoadOrStore(Instruction *I) { ... if (IsWrite && isVtableAccess(I)) { Value *StoredValue = cast<StoreInst>(I)->getValueOperand(); IRB.CreateCall2(TsanVptrUpdate, IRB.CreatePointerCast(Addr, IRB.getInt8PtrTy()), IRB.CreatePointerCast(StoredValue, IRB.getInt8PtrTy())); <<<<<<<<<<<<<<<< The IR looks like this: store i64 ptrtoint (i8** getelementptr inbounds ([9 x i8*]* @_ZTC3DDD8_3BBB, i64 0, i64 8) to i64), i64* %add.ptr.i, align 8, !tbaa !0 !0 = metadata !{metadata !"vtable pointer", metadata !1} So, we have a store which is marked as "vtable pointer" but which is actually not a pointer store. Investigating.
Reported by konstantin.s.serebryany on 2012-07-04 12:23:03
konstantin.s.serebryany
The text was updated successfully, but these errors were encountered:
fixed by LLVM r159736.
Reported by konstantin.s.serebryany on 2012-07-05 09:11:04
Fixed
Sorry, something went wrong.
Adding Project:ThreadSanitizer as part of GitHub migration.
Reported by glider@google.com on 2015-07-30 09:21:29
glider@google.com
No branches or pull requests
Originally reported on Google Code with ID 3
Reported by
konstantin.s.serebryany
on 2012-07-04 12:23:03The text was updated successfully, but these errors were encountered: