[Lldb-commits] [lldb] [lldb] Guard against a null module in Block::GetRangeContainingAddress (PR #205691)

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Thu Jun 25 09:07:51 PDT 2026


JDevlieghere wrote:

> I can see how that could happen, but I'm not sure if it's desirable. IIRC, creating these functions produces some undesirable artifacts, and we actually do a fair amount of work to validate that we don't create lldb_private::Function objects for dead-stripped code. I think it would be illuminating to see how this function manages to get past the checks in SymbolFileDWARF::ParseFunction.

It turns out that we reject dead code by comparing `low_pc` against the 8-byte `LLDB_INVALID_ADDRESS`. That happens to equal the tombstone on 64-bit targets, but wasm32 has 4-byte addresses, so its tombstone is `0xffffffff` and we let it pass. We can fix this by comparing against `llvm::dwarf::computeTombstoneAddress(cu->GetAddressByteSize())`. 

https://github.com/llvm/llvm-project/pull/205691


More information about the lldb-commits mailing list