[PATCH] D79165: [DebugInfo] - DWARFDebugFrame: do not call abort() on errors.

James Henderson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 13 03:11:41 PDT 2020


jhenderson added inline comments.


================
Comment at: llvm/lib/DebugInfo/DWARF/DWARFDebugFrame.cpp:419
+            return createStringError(
+                errc::illegal_byte_sequence,
+                "unknown augmentation character in entry at 0x%" PRIx64,
----------------
grimar wrote:
> jhenderson wrote:
> > Don't use `illegal_byte_sequence` - although it's not clear from the name, this is for Unicode encoding errors, so isn't the right error code for other invalid byte sequences. I've tended to use `invalid_argument` in similar situations.
> This file already use `illegal_byte_sequence` (line 50, 65). It is also used widely in LLVM to report invalid non-text data.
Just because it's already used widely //incorrectly// doesn't mean we should continue to do so - I'm pretty confident that people are all making the same, perfectly understandable, mistake.


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

https://reviews.llvm.org/D79165





More information about the llvm-commits mailing list