[llvm-bugs] [Bug 46388] New: CodeGen::CodeGenTBAA::getAccessTagInfo(clang::CodeGen::TBAAAccessInfo): Assertion `!Info.isIncomplete() && "Access to an object of an incomplete type!"' failed.
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Jun 18 12:23:11 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=46388
Bug ID: 46388
Summary: CodeGen::CodeGenTBAA::getAccessTagInfo(clang::CodeGen:
:TBAAAccessInfo): Assertion `!Info.isIncomplete() &&
"Access to an object of an incomplete type!"' failed.
Product: clang
Version: trunk
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: changochen1 at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
neeilans at live.com, richard-llvm at metafoo.co.uk
POC:
---
void *a;
int main(){
a[!a];
return 0;
}
---
cmdline:
---
clang-11 -cc1 -emit-obj -O3 -o /dev/null -x c poc5.c
---
version:
---
clang-11 --version
clang version 11.0.0 (https://github.com/llvm/llvm-project.git
28415e588f1c501967a9b596e6651787996f93ff)
Target: x86_64-unknown-linux-gnu
Thread model: posix
===
Stack dump:
---
clang-11: /home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp:397:
llvm::MDNode*
clang::CodeGen::CodeGenTBAA::getAccessTagInfo(clang::CodeGen::TBAAAccessInfo):
Assertion `!Info.isIncomplete() && "Access to an object of an incomplete
type!"' failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: /home/rxz226/llvm-project/build_clean/bin/clang-11
-cc1 -emit-obj -O3 -o /dev/null -x c poc5.c
1. <eof> parser at end of file
2. poc5.c:2:5: LLVM IR generation of declaration 'main'
3. poc5.c:2:5: Generating code for declaration 'main'
#0 0x00005618c48f89e5 llvm::sys::PrintStackTrace(llvm::raw_ostream&)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:564:0
#1 0x00005618c48f8a78 PrintStackTraceSignalHandler(void*)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:625:0
#2 0x00005618c48f6813 llvm::sys::RunSignalHandlers()
/home/rxz226/llvm-project/llvm/lib/Support/Signals.cpp:68:0
#3 0x00005618c48f8362 SignalHandler(int)
/home/rxz226/llvm-project/llvm/lib/Support/Unix/Signals.inc:406:0
#4 0x00007f9021ee6890 __restore_rt
(/lib/x86_64-linux-gnu/libpthread.so.0+0x12890)
#5 0x00007f9020dc1e97 raise
/build/glibc-OTsEL5/glibc-2.27/signal/../sysdeps/unix/sysv/linux/raise.c:51:0
#6 0x00007f9020dc3801 abort /build/glibc-OTsEL5/glibc-2.27/stdlib/abort.c:81:0
#7 0x00007f9020db339a __assert_fail_base
/build/glibc-OTsEL5/glibc-2.27/assert/assert.c:89:0
#8 0x00007f9020db3412 (/lib/x86_64-linux-gnu/libc.so.6+0x30412)
#9 0x00005618c4eebfa9
clang::CodeGen::CodeGenTBAA::getAccessTagInfo(clang::CodeGen::TBAAAccessInfo)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenTBAA.cpp:397:0
#10 0x00005618c4dc95c5
clang::CodeGen::CodeGenModule::getTBAAAccessTagInfo(clang::CodeGen::TBAAAccessInfo)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:758:0
#11 0x00005618c4dc97ed
clang::CodeGen::CodeGenModule::DecorateInstructionWithTBAA(llvm::Instruction*,
clang::CodeGen::TBAAAccessInfo)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:786:0
#12 0x00005618c513902d
clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(clang::CodeGen::Address,
bool, clang::QualType, clang::SourceLocation, clang::CodeGen::LValueBaseInfo,
clang::CodeGen::TBAAAccessInfo, bool)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExpr.cpp:1710:0
#13 0x00005618c5137f86
clang::CodeGen::CodeGenFunction::EmitLoadOfScalar(clang::CodeGen::LValue,
clang::SourceLocation)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExpr.cpp:1560:0
#14 0x00005618c5139f72
clang::CodeGen::CodeGenFunction::EmitLoadOfLValue(clang::CodeGen::LValue,
clang::SourceLocation)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExpr.cpp:1879:0
#15 0x00005618c5181c3e (anonymous
namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::CodeGen::LValue,
clang::SourceLocation)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:268:0
#16 0x00005618c5181f0c (anonymous
namespace)::ScalarExprEmitter::EmitLoadOfLValue(clang::Expr const*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:311:0
#17 0x00005618c518947e (anonymous
namespace)::ScalarExprEmitter::VisitArraySubscriptExpr(clang::ArraySubscriptExpr*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:1790:0
#18 0x00005618c519ba13 clang::StmtVisitorBase<std::add_pointer, (anonymous
namespace)::ScalarExprEmitter, llvm::Value*>::Visit(clang::Stmt*)
/home/rxz226/llvm-project/build_clean/tools/clang/include/clang/AST/StmtNodes.inc:635:0
#19 0x00005618c5182269 (anonymous
namespace)::ScalarExprEmitter::Visit(clang::Expr*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:429:0
#20 0x00005618c5199171
clang::CodeGen::CodeGenFunction::EmitScalarExpr(clang::Expr const*, bool)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExprScalar.cpp:4724:0
#21 0x00005618c5130f49 clang::CodeGen::CodeGenFunction::EmitAnyExpr(clang::Expr
const*, clang::CodeGen::AggValueSlot, bool)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExpr.cpp:211:0
#22 0x00005618c5130eb4
clang::CodeGen::CodeGenFunction::EmitIgnoredExpr(clang::Expr const*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGExpr.cpp:196:0
#23 0x00005618c4d18e74 clang::CodeGen::CodeGenFunction::EmitStmt(clang::Stmt
const*, llvm::ArrayRef<clang::Attr const*>)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGStmt.cpp:118:0
#24 0x00005618c4d19f82
clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(clang::CompoundStmt
const&, bool, clang::CodeGen::AggValueSlot)
/home/rxz226/llvm-project/clang/lib/CodeGen/CGStmt.cpp:418:0
#25 0x00005618c4db1fc9
clang::CodeGen::CodeGenFunction::EmitFunctionBody(clang::Stmt const*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1105:0
#26 0x00005618c4db2c46
clang::CodeGen::CodeGenFunction::GenerateCode(clang::GlobalDecl,
llvm::Function*, clang::CodeGen::CGFunctionInfo const&)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenFunction.cpp:1270:0
#27 0x00005618c4ddb411
clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:4531:0
#28 0x00005618c4dd4032
clang::CodeGen::CodeGenModule::EmitGlobalDefinition(clang::GlobalDecl,
llvm::GlobalValue*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2898:0
#29 0x00005618c4dd2ff9
clang::CodeGen::CodeGenModule::EmitGlobal(clang::GlobalDecl)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:2651:0
#30 0x00005618c4ddf520
clang::CodeGen::CodeGenModule::EmitTopLevelDecl(clang::Decl*)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenModule.cpp:5340:0
#31 0x00005618c5dde8df (anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(clang::DeclGroupRef)
/home/rxz226/llvm-project/clang/lib/CodeGen/ModuleBuilder.cpp:169:0
#32 0x00005618c5dd8164
clang::BackendConsumer::HandleTopLevelDecl(clang::DeclGroupRef)
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:216:0
#33 0x00005618c74bcdd4 clang::ParseAST(clang::Sema&, bool, bool)
/home/rxz226/llvm-project/clang/lib/Parse/ParseAST.cpp:162:0
#34 0x00005618c54b3c97 clang::ASTFrontendAction::ExecuteAction()
/home/rxz226/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1060:0
#35 0x00005618c5dd5f8a clang::CodeGenAction::ExecuteAction()
/home/rxz226/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1185:0
#36 0x00005618c54b35f8 clang::FrontendAction::Execute()
/home/rxz226/llvm-project/clang/lib/Frontend/FrontendAction.cpp:957:0
#37 0x00005618c54484d6
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&)
/home/rxz226/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:973:0
#38 0x00005618c562c81f
clang::ExecuteCompilerInvocation(clang::CompilerInstance*)
/home/rxz226/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:282:0
#39 0x00005618c1d34092 cc1_main(llvm::ArrayRef<char const*>, char const*,
void*) /home/rxz226/llvm-project/clang/tools/driver/cc1_main.cpp:240:0
#40 0x00005618c1d29696 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&)
/home/rxz226/llvm-project/clang/tools/driver/driver.cpp:330:0
#41 0x00005618c1d29e68 main
/home/rxz226/llvm-project/clang/tools/driver/driver.cpp:407:0
#42 0x00007f9020da4b97 __libc_start_main
/build/glibc-OTsEL5/glibc-2.27/csu/../csu/libc-start.c:344:0
#43 0x00005618c1d27d1a _start
(/home/rxz226/llvm-project/build_clean/bin/clang-11+0x28a0d1a)
[1] 34158 abort /home/rxz226/llvm-project/build_clean/bin/clang-11 -cc1
-emit-obj -O3 -o -x
---
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200618/013977b2/attachment.html>
More information about the llvm-bugs
mailing list