[llvm-bugs] [Bug 36224] New: lldb fails on loading a core file: Assertion failed: (template_counter >= 0), function ConsumeTemplateArgs

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Feb 3 20:21:56 PST 2018


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

            Bug ID: 36224
           Summary: lldb fails on loading a core file: Assertion failed:
                    (template_counter >= 0), function ConsumeTemplateArgs
           Product: lldb
           Version: 6.0
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at lists.llvm.org
          Reporter: bogorodskiy at gmail.com
                CC: llvm-bugs at lists.llvm.org

Environment:

$ uname -a 
FreeBSD kloomba 12.0-CURRENT FreeBSD 12.0-CURRENT #2 r328649: Thu Feb  1
08:12:19 +04 2018     root at romashka:/usr/obj/usr/src/amd64.amd64/sys/GENERIC 
amd64
$ clang -v
FreeBSD clang version 6.0.0 (branches/release_60 323338) (based on LLVM 6.0.0)
Target: x86_64-unknown-freebsd12.0
Thread model: posix
InstalledDir: /usr/bin
$ lldb -v
lldb version 6.0.0
  clang revision 323338
$

I have a Python application that makes python2.7 dump a core sometimes. When I
try to open this core file with lldb, it dumps a core as well:

$ sudo lldb /usr/local/bin/python2.7 -c /tmp/python2.7_1941_0.core
(lldb) target create "/usr/local/bin/python2.7" --core
"/tmp/python2.7_1941_0.core"
Assertion failed: (template_counter >= 0), function ConsumeTemplateArgs, file
/usr/src/contrib/llvm/tools/lldb/source/Plugins/Language/CPlusPlus/CPlusPlusNameParser.cpp,
line 245.
zsh: abort      sudo lldb /usr/local/bin/python2.7 -c
/tmp/python2.7_1941_0.core
$

I can open lldb's own core file though:

(lldb) bt
* thread #1, name = 'lldb', stop reason = signal SIGABRT
  * frame #0: 0x0000000803e672ea libc.so.7`__sys_thr_kill at thr_kill.S:3
    frame #1: 0x0000000803e672b4 libc.so.7`__raise(s=6) at raise.c:54
    frame #2: 0x0000000803e67229 libc.so.7`abort at abort.c:67
    frame #3: 0x0000000803ee68f1 libc.so.7`__assert(func=<unavailable>,
file=<unavailable>, line=<unavailable>, failedexpr=<unavailable>) at
assert.c:53
    frame #4: 0x00000000017fb8e5 lldb`::ConsumeTemplateArgs() at
CPlusPlusNameParser.cpp:245
    frame #5: 0x00000000017faf12 lldb`::ParseFullNameImpl() at
CPlusPlusNameParser.cpp:551
    frame #6: 0x00000000017fa7d9 lldb`::ParseFunctionImpl() at
CPlusPlusNameParser.cpp:114
    frame #7: 0x00000000017fa6f5 lldb`::ParseAsFunctionDefinition() at
CPlusPlusNameParser.cpp:45
    frame #8: 0x00000000017ed364 lldb`::Parse() at CPlusPlusLanguage.cpp:202
    frame #9: 0x00000000017ed3e7
lldb`lldb_private::CPlusPlusLanguage::MethodName::GetBasename(void) at
CPlusPlusLanguage.cpp:218
    frame #10: 0x0000000001700cba lldb`::InitNameIndexes() at Symtab.cpp:294
    frame #11: 0x00000000017018b1 lldb`::PreloadSymbols() at Symtab.cpp:407
    frame #12: 0x00000000018dde19 lldb`::PreloadSymbols() at Module.cpp:1416
    frame #13: 0x00000000016b2e14 lldb`::GetSharedModule() at Target.cpp:2028
    frame #14: 0x00000000019c24ed lldb`::LoadModuleAtAddress() at
DynamicLoader.cpp:171
    frame #15: 0x00000000019a0d35 lldb`::LoadAllCurrentModules() at
DynamicLoaderPOSIXDYLD.cpp:537
    frame #16: 0x000000000199e9aa lldb`::DidAttach() at
DynamicLoaderPOSIXDYLD.cpp:171
    frame #17: 0x0000000001699231 lldb`::LoadCore() at Process.cpp:2853
    frame #18: 0x000000000184c85d lldb`::DoExecute() at
CommandObjectTarget.cpp:371
    frame #19: 0x000000000181911f lldb`::Execute() at CommandObject.cpp:991
    frame #20: 0x00000000018278f8 lldb`::HandleCommand() at
CommandInterpreter.cpp:1683
    frame #21: 0x000000000182ae2a lldb`::IOHandlerInputComplete() at
CommandInterpreter.cpp:2771
    frame #22: 0x00000000018e35ff lldb`::Run() at IOHandler.cpp:573
    frame #23: 0x000000000190bb5f lldb`::ExecuteIOHandlers() at
Debugger.cpp:961
    frame #24: 0x000000000182b9a3 lldb`::RunCommandInterpreter() at
CommandInterpreter.cpp:2971
    frame #25: 0x000000000192de29 lldb`::RunCommandInterpreter() at
SBDebugger.cpp:905
    frame #26: 0x0000000001678263 lldb`::MainLoop() at Driver.cpp:1105
    frame #27: 0x00000000016789bc lldb`main at Driver.cpp:1253
    frame #28: 0x0000000001675095 lldb`_start(ap=<unavailable>,
cleanup=<unavailable>) at crt1.c:74
(lldb)

-- 
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/20180204/4ee1c8e9/attachment-0001.html>


More information about the llvm-bugs mailing list