Open LloydW93 opened 1 week ago
@llvm/issue-subscribers-clang-frontend
Author: Lloyd Wallis (LloydW93)
Ah this reminds me of the issue I saw with static union members, where we thought the static data member was actually not a static, and went down the same recursion trying to lay out the member. (https://github.com/llvm/llvm-project/pull/68300)
Could you attach the DWARF that gets produced for this (e.g., using dwarfdump
on the binary)?
@llvm/issue-subscribers-lldb
Author: Lloyd Wallis (LloydW93)
dwardump.txt Sure - attaching it here (with a sed on the base dir, but same-length string replacement)
Potentially similar issues: https://github.com/llvm/llvm-project/issues/64628 https://github.com/llvm/llvm-project/issues/43604 https://github.com/llvm/llvm-project/issues/63667 https://github.com/llvm/llvm-project/issues/66335 https://github.com/llvm/llvm-project/issues/53490
Probably related issue/fix: https://github.com/llvm/llvm-project/pull/68300 https://github.com/llvm/llvm-project/issues/68135
When debugging the following rust code using rust-lldb (a script that loads some extra formatters):
frame variable
aftermap
has been declared results in a stack overflow, followed by a segfault. The diagnostic.log is empty.The top/tail of the stack:
The loop starts when the synthetic lookup function calls GetByteSize() on
map.base.table
's type (<String, OuterEnum>
). When inspecting the debug symbols, we can see there appears to be recursion:This is obviously circular and incorrect - and though I'm not sure if that's the symbol file or the interpretation, I'm hoping there's something that can be done to handle that better...
If we rename the Enum value's field to
ValueType1
, then everything works:I've reproduced this with lldb-18, lldb-19.1, and nightly. Built using rust 1.82.