[llvm-bugs] [Bug 49564] New: gcc11 std::unique_ptr crashes LLDB

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 12 13:39:26 PST 2021


https://bugs.llvm.org/show_bug.cgi?id=49564

            Bug ID: 49564
           Summary: gcc11 std::unique_ptr crashes LLDB
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: jan.kratochvil at redhat.com
                CC: jdevlieghere at apple.com, llvm-bugs at lists.llvm.org

Created attachment 24633
  --> https://bugs.llvm.org/attachment.cgi?id=24633&action=edit
a.o

gcc-11.0.0-0.19.fc35.x86_64

echo -e '#include <memory>\nstd::unique_ptr<int> iup;'|g++ -c -o a.o -g -x c++
-;./bin/lldb ./a.o -o 'p iup' 

(lldb) target create "./a.o"
Current executable set to
'/home/jkratoch/redhat/llvm-monorepo-clangassertdebugninjarawhide/a.o'
(x86_64).
(lldb) p iup
lldb:
/quad/home/jkratoch/redhat/llvm-monorepo/clang/lib/CodeGen/CGRecordLayoutBuilder.cpp:742:
void (anonymous namespace)::CGRecordLowering::clipTailPadding(): Assertion
`Prior->Kind == MemberInfo::Field && "Only storage fields have tail padding!"'
failed.
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash
backtrace.
Stack dump:
0.      Program arguments: ./bin/lldb ./a.o -o "p iup"
 #0 0x00000000003a8b2a llvm::sys::PrintStackTrace(llvm::raw_ostream&, int)
/quad/home/jkratoch/redhat/llvm-monorepo/llvm/lib/Support/Unix/Signals.inc:565:11

...

* thread #1, name = 'lldb', stop reason = hit program assert
    frame #0: 0x00007fb98fbb2292 libc.so.6`raise + 322
    frame #1: 0x00007fb98fb9b950 libc.so.6`abort + 450
    frame #2: 0x00007fb98fb9b789
libc.so.6`.annobin_unwind_resume.c_end.unlikely + 15
    frame #3: 0x00007fb98fbaaa16 libc.so.6`__assert_fail + 70
  * frame #4: 0x00007fb999e474b2 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::clipTailPadding(this=0x00007ffd6e5ee5b0) at
CGRecordLayoutBuilder.cpp:741:7
    frame #5: 0x00007fb999e455f5 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::lower(this=0x00007ffd6e5ee5b0, NVBaseType=false)
at CGRecordLayoutBuilder.cpp:302:3
    frame #6: 0x00007fb999e44777
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ComputeRecordLayout(this=0x000000000200ca80,
D=0x0000000002089440, Ty=0x000000000200f010) at
CGRecordLayoutBuilder.cpp:881:11
    frame #7: 0x00007fb9997b443f
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(this=0x000000000200ca80,
RD=0x0000000002089440) at CodeGenTypes.cpp:850:44
    frame #8: 0x00007fb9997b4408
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(this=0x000000000200ca80,
RD=0x0000000002088d88) at CodeGenTypes.cpp:845:7
    frame #9: 0x00007fb9997b2c8e
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertType(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5eecc0) at CodeGenTypes.cpp:416:12
    frame #10: 0x00007fb9997b2a6d
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertTypeForMem(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5eed50, ForBitField=false) at CodeGenTypes.cpp:98:19
    frame #11: 0x00007fb999e480db liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::getStorageType(this=0x00007ffd6e5ef220,
FD=0x000000000208cc98) at CGRecordLayoutBuilder.cpp:148:30
    frame #12: 0x00007fb999e46997 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::accumulateFields(this=0x00007ffd6e5ef220) at
CGRecordLayoutBuilder.cpp:384:11
    frame #13: 0x00007fb999e45527 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::lower(this=0x00007ffd6e5ef220, NVBaseType=false)
at CGRecordLayoutBuilder.cpp:287:3
    frame #14: 0x00007fb999e44777
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ComputeRecordLayout(this=0x000000000200ca80,
D=0x0000000002086a20, Ty=0x000000000200efd0) at
CGRecordLayoutBuilder.cpp:881:11
    frame #15: 0x00007fb9997b443f
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(this=0x000000000200ca80,
RD=0x0000000002086a20) at CodeGenTypes.cpp:850:44
    frame #16: 0x00007fb9997b4408
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(this=0x000000000200ca80,
RD=0x0000000002086450) at CodeGenTypes.cpp:845:7
    frame #17: 0x00007fb9997b2c8e
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertType(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5ef930) at CodeGenTypes.cpp:416:12
    frame #18: 0x00007fb9997b2a6d
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertTypeForMem(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5ef9c0, ForBitField=false) at CodeGenTypes.cpp:98:19
    frame #19: 0x00007fb999e480db liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::getStorageType(this=0x00007ffd6e5efe90,
FD=0x0000000002099090) at CGRecordLayoutBuilder.cpp:148:30
    frame #20: 0x00007fb999e46997 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::accumulateFields(this=0x00007ffd6e5efe90) at
CGRecordLayoutBuilder.cpp:384:11
    frame #21: 0x00007fb999e45527 liblldb.so.13git`(anonymous
namespace)::CGRecordLowering::lower(this=0x00007ffd6e5efe90, NVBaseType=false)
at CGRecordLayoutBuilder.cpp:287:3
    frame #22: 0x00007fb999e44777
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ComputeRecordLayout(this=0x000000000200ca80,
D=0x000000000203e4b0, Ty=0x000000000200ef90) at
CGRecordLayoutBuilder.cpp:881:11
    frame #23: 0x00007fb9997b443f
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertRecordDeclType(this=0x000000000200ca80,
RD=0x000000000203e4b0) at CodeGenTypes.cpp:850:44
    frame #24: 0x00007fb9997b2c8e
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertType(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5f04a0) at CodeGenTypes.cpp:416:12
    frame #25: 0x00007fb9997b2a6d
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertTypeForMem(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5f0530, ForBitField=false) at CodeGenTypes.cpp:98:19
    frame #26: 0x00007fb9997b3305
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertType(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5f08d0) at CodeGenTypes.cpp:642:31
    frame #27: 0x00007fb9997b2a6d
liblldb.so.13git`clang::CodeGen::CodeGenTypes::ConvertTypeForMem(this=0x000000000200ca80,
T=QualType @ 0x00007ffd6e5f0960, ForBitField=false) at CodeGenTypes.cpp:98:19
    frame #28: 0x00007fb999a90c2b
liblldb.so.13git`clang::CodeGen::CodeGenModule::getOrCreateStaticVarDecl(this=0x000000000200c970,
D=0x000000000209ea48, Linkage=InternalLinkage) at CGDecl.cpp:253:32
    frame #29: 0x00007fb999a90444
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitStaticVarDecl(this=0x00007ffd6e5f15f0,
D=0x000000000209ea48, Linkage=InternalLinkage) at CGDecl.cpp:398:30
    frame #30: 0x00007fb999a9020e
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitVarDecl(this=0x00007ffd6e5f15f0,
D=0x000000000209ea48) at CGDecl.cpp:201:12
    frame #31: 0x00007fb999a8ff66
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitDecl(this=0x00007ffd6e5f15f0,
D=0x000000000209ea48) at CGDecl.cpp:153:5
    frame #32: 0x00007fb999bc6ac0
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitDeclStmt(this=0x00007ffd6e5f15f0,
S=0x000000000209eb38) at CGStmt.cpp:1256:5
    frame #33: 0x00007fb999bbf803
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitSimpleStmt(this=0x00007ffd6e5f15f0,
S=0x000000000209eb38, Attrs=ArrayRef<const clang::Attr *> @ 0x00007ffd6e5f1058)
at CGStmt.cpp:392:5
    frame #34: 0x00007fb999bbea7c
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitStmt(this=0x00007ffd6e5f15f0,
S=0x000000000209eb38, Attrs=ArrayRef<const clang::Attr *> @ 0x00007ffd6e5f1140)
at CGStmt.cpp:55:7
    frame #35: 0x00007fb999bc7a2f
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitCompoundStmtWithoutScope(this=0x00007ffd6e5f15f0,
S=0x000000000209e9f8, GetLast=false, AggSlot=AggValueSlot @ 0x00007ffd6e5f12b0)
at CGStmt.cpp:482:7
    frame #36: 0x00007fb999a3774e
liblldb.so.13git`clang::CodeGen::CodeGenFunction::EmitFunctionBody(this=0x00007ffd6e5f15f0,
Body=0x000000000209e9f8) at CodeGenFunction.cpp:1187:5
    frame #37: 0x00007fb999a381ac
liblldb.so.13git`clang::CodeGen::CodeGenFunction::GenerateCode(this=0x00007ffd6e5f15f0,
GD=GlobalDecl @ 0x00007ffd6e5f1580, Fn=0x000000000207c6a8,
FnInfo=0x0000000002088540) at CodeGenFunction.cpp:1344:5
    frame #38: 0x00007fb9998ef622
liblldb.so.13git`clang::CodeGen::CodeGenModule::EmitGlobalFunctionDefinition(this=0x000000000200c970,
GD=GlobalDecl @ 0x00007ffd6e5f2c40, GV=0x000000000207c6a8) at
CodeGenModule.cpp:4786:26
    frame #39: 0x00007fb9998e6ad9
liblldb.so.13git`clang::CodeGen::CodeGenModule::EmitGlobalDefinition(this=0x000000000200c970,
GD=GlobalDecl @ 0x00007ffd6e5f2d90, GV=0x0000000000000000) at
CodeGenModule.cpp:3172:12
    frame #40: 0x00007fb9998eb85b
liblldb.so.13git`clang::CodeGen::CodeGenModule::EmitGlobal(this=0x000000000200c970,
GD=GlobalDecl @ 0x00007ffd6e5f2f70) at CodeGenModule.cpp:2924:5
    frame #41: 0x00007fb9998f2c00
liblldb.so.13git`clang::CodeGen::CodeGenModule::EmitTopLevelDecl(this=0x000000000200c970,
D=0x000000000203d9c8) at CodeGenModule.cpp:5624:5
    frame #42: 0x00007fb99975a4b0 liblldb.so.13git`(anonymous
namespace)::CodeGeneratorImpl::HandleTopLevelDecl(this=0x0000000001ffff40,
DG=DeclGroupRef @ 0x00007ffd6e5f4aa0) at ModuleBuilder.cpp:170:18
    frame #43: 0x00007fb999527ce8
liblldb.so.13git`lldb_private::ASTResultSynthesizer::HandleTopLevelDecl(this=0x0000000001fb4100,
D=DeclGroupRef @ 0x00007ffd6e5f4af0) at ASTResultSynthesizer.cpp:110:27
    frame #44: 0x00007fb999507bda
liblldb.so.13git`lldb_private::ASTConsumerForwarder::HandleTopLevelDecl(this=0x0000000002001f40,
D=DeclGroupRef @ 0x00007ffd6e5f4b28) at ASTUtils.h:152:17
    frame #45: 0x00007fb99b66ea86
liblldb.so.13git`clang::ParseAST(S=0x0000000002001f70, PrintStats=false,
SkipFunctionBodies=false) at ParseAST.cpp:162:31
    frame #46: 0x00007fb9994c0c2a
liblldb.so.13git`lldb_private::ClangExpressionParser::ParseInternal(this=0x0000000001f7f8f0,
diagnostic_manager=0x00007ffd6e5f5708, completion_consumer=0x0000000000000000,
completion_line=0, completion_column=0) at ClangExpressionParser.cpp:1172:5
    frame #47: 0x00007fb9994c0f27
liblldb.so.13git`lldb_private::ClangExpressionParser::Parse(this=0x0000000001f7f8f0,
diagnostic_manager=0x00007ffd6e5f5708) at ClangExpressionParser.cpp:1030:10
    frame #48: 0x00007fb999520493
liblldb.so.13git`lldb_private::ClangUserExpression::TryParse(this=0x0000000001fb04c0,
diagnostic_manager=0x00007ffd6e5f5708, exe_scope=0x0000000001f666b8,
exe_ctx=0x00007ffd6e5f5b20, execution_policy=eExecutionPolicyNever,
keep_result_in_memory=true, generate_debug_info=false) at
ClangUserExpression.cpp:582:35
    frame #49: 0x00007fb999520a38
liblldb.so.13git`lldb_private::ClangUserExpression::Parse(this=0x0000000001fb04c0,
diagnostic_manager=0x00007ffd6e5f5708, exe_ctx=0x00007ffd6e5f5b20,
execution_policy=eExecutionPolicyNever, keep_result_in_memory=true,
generate_debug_info=false) at ClangUserExpression.cpp:681:24
    frame #50: 0x00007fb9967ec5ec
liblldb.so.13git`lldb_private::UserExpression::Evaluate(exe_ctx=0x00007ffd6e5f5b20,
options=0x00007ffd6e5f5d80, expr=(Data = "iup", Length = 3), prefix=(Data = "",
Length = 0), result_valobj_sp=nullptr, error=0x00007ffd6e5f5a50,
fixed_expression=error: summary string parsing error,
ctx_obj=0x0000000000000000) at UserExpression.cpp:253:27
    frame #51: 0x00007fb996a06981
liblldb.so.13git`lldb_private::Target::EvaluateExpression(this=0x0000000001f66470,
expr=(Data = "iup", Length = 3), exe_scope=0x0000000000000000,
result_valobj_sp=nullptr, options=0x00007ffd6e5f5d80, fixed_expression=error:
summary string parsing error, ctx_obj=0x0000000000000000) at Target.cpp:2422:25
    frame #52: 0x00007fb9993aa59c
liblldb.so.13git`lldb_private::CommandObjectExpression::EvaluateExpression(this=0x0000000001e73800,
expr=(Data = "iup", Length = 3), output_stream=0x00007ffd6e5f66f0,
error_stream=0x00007ffd6e5f6798, result=0x00007ffd6e5f66f0) at
CommandObjectExpression.cpp:412:38
    frame #53: 0x00007fb9993ab509
liblldb.so.13git`lldb_private::CommandObjectExpression::DoExecute(this=0x0000000001e73800,
command=(Data = "-- iup", Length = 6), result=0x00007ffd6e5f66f0) at
CommandObjectExpression.cpp:641:7
    frame #54: 0x00007fb99687a834
liblldb.so.13git`lldb_private::CommandObjectRaw::Execute(this=0x0000000001e73800,
args_string="-- iup", result=0x00007ffd6e5f66f0) at CommandObject.cpp:1021:17
    frame #55: 0x00007fb99684cef2
liblldb.so.13git`lldb_private::CommandInterpreter::HandleCommand(this=0x0000000001e55af0,
command_line="p iup", lazy_add_to_history=eLazyBoolCalculate,
result=0x00007ffd6e5f66f0) at CommandInterpreter.cpp:1800:14
    frame #56: 0x00007fb99685106a
liblldb.so.13git`lldb_private::CommandInterpreter::IOHandlerInputComplete(this=0x0000000001e55af0,
io_handler=0x0000000001f647e0, line=error: summary string parsing error) at
CommandInterpreter.cpp:2846:3
    frame #57: 0x00007fb99671bef0
liblldb.so.13git`lldb_private::IOHandlerEditline::Run(this=0x0000000001f647e0)
at IOHandler.cpp:579:22
    frame #58: 0x00007fb9966df311
liblldb.so.13git`lldb_private::Debugger::RunIOHandlers(this=0x0000000001e54290)
at Debugger.cpp:861:16
    frame #59: 0x00007fb996852274
liblldb.so.13git`lldb_private::CommandInterpreter::RunCommandInterpreter(this=0x0000000001e55af0,
options=0x0000000001f644b0) at CommandInterpreter.cpp:3085:16
    frame #60: 0x00007fb995f22c9e
liblldb.so.13git`lldb::SBDebugger::RunCommandInterpreter(this=0x00007ffd6e5f6f18,
options=0x00007ffd6e5f6bd0) at SBDebugger.cpp:1220:14
    frame #61: 0x0000000000293b31
lldb`Driver::MainLoop(this=0x00007ffd6e5f6ef8) at Driver.cpp:613:20
    frame #62: 0x0000000000295040 lldb`main(argc=4, argv=0x00007ffd6e5f7518) at
Driver.cpp:940:26
    frame #63: 0x00007fb98fb9cb75 libc.so.6`__libc_start_main + 213
    frame #64: 0x00000000002912ae lldb`_start + 46

-- 
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/20210312/e678dde9/attachment-0001.html>


More information about the llvm-bugs mailing list