Issue 93141
Summary [LLDB] Duplicated FieldDecl
Labels lldb
Assignees
Reporter asavonic
    I stumbled across a bug where a FieldDecl is duplicated in a C++ record. The decl name and type are identical, but addresses are different. LLDB and Clang don't account for this, and Clang crashes during layout computation later. I don't have a short reproducer for this issue yet. LLDB seems to crash only when there is a certain sequence of separate _expression_ evaluations.

However, there used to be a patch [D102993](https://reviews.llvm.org/D102993) that fixed a similar issue, but it was reverted in [D113449](https://reviews.llvm.org/D113449). The original test seems to be valid, but it was disabled in the revert, and it still is:

```
lldb/test/API/lang/cpp/reference-to-outer-type/TestCppReferenceToOuterClass.py:
class TestCase(TestBase):
    @unittest.expectedFailure  # The fix for this was reverted due to llvm.org/PR52257
    def test(self):
 self.build()
 self.dbg.CreateTarget(self.getBuildArtifact("a.out"))
        test_var = self.expect_expr("test_var", result_type="In")
        nested_member = test_var.GetChildMemberWithName("NestedClassMember")
 self.assertEqual("Outer::NestedClass", nested_member.GetType().GetName())
```
@rupprecht, @Teemperor, do you know what happened with D102993 after the revert? Can you confirm that the test from the patch is indeed valid?
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to