[PATCH] D95838: [WebAssembly] Prevent data inside text sections in assembly

Wouter van Oortmerssen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 1 17:36:24 PST 2021


aardappel added inline comments.


================
Comment at: llvm/lib/MC/WasmObjectWriter.cpp:494
+      if (SecSymIt == SectionFunctions.end())
+        report_fatal_error("section doesn\'t have defining symbol");
+      SectionSymbol = SecSymIt->second;
----------------
Note this check may strictly not be necessary anymore, but the unchecked dereference that was there before seemed a bit fragile for an invariant established elsewhere.  Maybe better as an assert?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D95838/new/

https://reviews.llvm.org/D95838



More information about the llvm-commits mailing list