[PATCH] D36207: [compiler-rt] Check for empty buffer in Addr2LineProcess::ReadFromSymbolizer

Aleksey Shlyapnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 17:13:31 PDT 2017


alekseyshl accepted this revision.
alekseyshl added a comment.
This revision is now accepted and ready to land.

addr2line is not necessary present on the system, I don't think you should test for it.



================
Comment at: lib/sanitizer_common/sanitizer_symbolizer_posix_libcdep.cc:276
+    // If buffer is empty and null-terminated, then input is longer than
+    // max_length, so simply skip this frame by returning.
+    if (*buffer == '\0')
----------------
// The returned buffer is empty when output is valid, but exceeds max_length.

We're not skipping the frame, we just not looking for output_terminator_ in it.


Repository:
  rL LLVM

https://reviews.llvm.org/D36207





More information about the llvm-commits mailing list