[llvm] SymbolizableObjectFile: Invalidate Wasm addresses that map outside the code section (PR #191329)

Derek Schuff via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 10 09:49:15 PDT 2026


================
@@ -273,13 +273,26 @@ object::SectionedAddress SymbolizableObjectFile::convertDwarfOffsetForWasm(
     object::SectionedAddress ModuleOffset) const {
   if (!Module->isWasm())
     return ModuleOffset;
+
+  // For Wasm object files, addresses are already section-relative.
+  if (Module->isRelocatableObject())
+    return ModuleOffset;
----------------
dschuff wrote:

Yeah, I came to the fix kind of circuitously when I was thinking about the emscripten test and discovered it didn't fail when I thought it should have. This made it easier to think about.

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


More information about the llvm-commits mailing list