[PATCH] D70720: [llvm-objdump] Display locations of variables alongside disassembly

Ben Langmuir via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 16 16:57:37 PDT 2020


benlangmuir added inline comments.


================
Comment at: llvm/lib/Support/FormattedStream.cpp:38
+    // The string should never end part way through a multi-byte sequence.
+    assert((Ptr + NumBytes) <= End && "Malformed multi-byte sequence");
+
----------------
While it is probablye reasonable to expect only well-formed UTF-8 during the top-level call to `write`, this will fail for a buffered `raw_ostream` if you write a multi-byte sequence that happens to crosses the buffer end point.  raw_ostream's buffering is byte-level, and won't prevent splitting a multibyte character.  We saw this assertion failure in practice.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70720





More information about the llvm-commits mailing list