https://llvm.org/bugs/show_bug.cgi?id=25253
Bug ID: 25253 Summary: Expression evaluation crashes when base and derived classes are the same Product: lldb Version: unspecified Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: All Bugs Assignee: lldb-dev@lists.llvm.org Reporter: tbergham...@google.com CC: llvm-b...@lists.llvm.org Classification: Unclassified Created attachment 15115 --> https://llvm.org/bugs/attachment.cgi?id=15115&action=edit Source to reproduce the bug If the base class of a class is the same class as the class itself but with some (not all) of the template arguments are different then the expression evaluation runs into an infinite recursion with the following calling sequence: frame #7036: 0x00007f7813d99397 liblldb.so.3.8`(anonymous namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes(this=0x00007ffd0e9ae938) + 167 at RecordLayoutBuilder.cpp:192 frame #7037: 0x00007f7813d8e35d liblldb.so.3.8`(anonymous namespace)::EmptySubobjectMap::EmptySubobjectMap(this=0x00007ffd0e9ae938, Context=0x000000001c48f650, Class=0x000000001918e340) + 125 at RecordLayoutBuilder.cpp:171 frame #7038: 0x00007f7813d8d8ca liblldb.so.3.8`clang::ASTContext::getASTRecordLayout(this=0x000000001c48f650, D=0x000000001918e340) const + 1546 at RecordLayoutBuilder.cpp:2909 frame #7039: 0x00007f7813d99397 liblldb.so.3.8`(anonymous namespace)::EmptySubobjectMap::ComputeEmptySubobjectSizes(this=0x00007ffd0e9af708) + 167 at RecordLayoutBuilder.cpp:192 frame #7040: 0x00007f7813d8e35d liblldb.so.3.8`(anonymous namespace)::EmptySubobjectMap::EmptySubobjectMap(this=0x00007ffd0e9af708, Context=0x000000001c48f650, Class=0x000000001918e340) + 125 at RecordLayoutBuilder.cpp:171 frame #7041: 0x00007f7813d8d8ca liblldb.so.3.8`clang::ASTContext::getASTRecordLayout(this=0x000000001c48f650, D=0x000000001918e340) const + 1546 at RecordLayoutBuilder.cpp:2909 Steps to reproduce the issue: * g++ -g -std=c++11 RecursiveBase.cpp (source attached) * ./bin/lldb a.out * breakpoint set -n main * process launch * expression A The attached code is based on the implementation of the __atomic_base class in libcxx after simplifying it to the minimal test case. -- You are receiving this mail because: You are the assignee for the bug.
_______________________________________________ lldb-dev mailing list lldb-dev@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev