LLDB can crash in TypeSystemClang::GetIndexOfChildMemberWithName, at a point where it pushes an index onto the child_indexes vector, tries to call itself recursively, then tries to pop the entry from child_indexes. The problem is that the recursive call can clear child_indexes, so that this code ends up trying to pop an already empty vector. This change saves the old vector before the push, then restores the saved vector rather than trying to pop.
15 lines
200 B
C++
15 lines
200 B
C++
struct A {
|
|
struct {
|
|
int x = 1;
|
|
};
|
|
} a;
|
|
|
|
struct B {
|
|
// Anonymous struct inherits another struct.
|
|
struct : public A {
|
|
int z = 3;
|
|
};
|
|
} b;
|
|
|
|
int main(int argc, char **argv) { return 0; }
|