[clang] [clang][AST] Added assert to prevent infinite recursion in computing layout (PR #154134)
via cfe-commits
cfe-commits at lists.llvm.org
Fri Aug 22 08:11:59 PDT 2025
tgs-sc wrote:
> Because this can be hit by user-written expressions, I think an assert is actually the wrong fix; we should handle it gracefully. Otherwise, in asserts builds this is effectively a crash and in non-asserts builds it's still an infinite recursion.
>
> CC @JDevlieghere @Michael137 for other opinions on the lldb side
The user expression only triggered parsing the part of dwarf that was incorrectly created.
> in asserts builds this is effectively a crash
Yes, that's exactly the reason why i want to add this assert here. Simply because it works better than infinite recursion.
This is an original PR, this patch was created from:
https://github.com/llvm/llvm-project/pull/154123
https://github.com/llvm/llvm-project/pull/154134
More information about the cfe-commits
mailing list