diff --git a/lld/wasm/MapFile.cpp b/lld/wasm/MapFile.cpp --- a/lld/wasm/MapFile.cpp +++ b/lld/wasm/MapFile.cpp @@ -76,8 +76,11 @@ std::vector str(syms.size()); parallelForEachN(0, syms.size(), [&](size_t i) { raw_string_ostream os(str[i]); - auto &chunk = *syms[i]->getChunk(); - uint64_t fileOffset = chunk.outputSec->getOffset() + chunk.outputOffset; + auto *chunk = syms[i]->getChunk(); + // TODO: Handle symbol types besides DefinedFunction and DefinedData + if (!chunk) + return; + uint64_t fileOffset = chunk->outputSec->getOffset() + chunk->outputOffset; uint64_t vma = -1; uint64_t size = 0; if (auto *DD = dyn_cast(syms[i])) {