Skip to content

Commit

Permalink
[libunwind] Remove __FILE__ and __LINE__ from error reporting
Browse files Browse the repository at this point in the history
We were seeing non-deterministic binary size differences depending on which
toolchain was used to build fuchsia. This is because libunwind embeded the
FILE path into a logging macro, even for release builds, which makes the code
dependent on the build directory.

This removes the file and line number from the error message. This is
consistent with how other runtimes report error, e.g.
https://github.com/llvm/llvm-project/blob/master/libcxxabi/src/abort_message.cpp#L30.

Differential Revision: https://reviews.llvm.org/D75890
  • Loading branch information
PiJoules committed Mar 11, 2020
1 parent 48121a5 commit 1c70dec
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions libunwind/src/config.h
Expand Up @@ -122,8 +122,7 @@
#else
#define _LIBUNWIND_ABORT(msg) \
do { \
fprintf(stderr, "libunwind: %s %s:%d - %s\n", __func__, __FILE__, \
__LINE__, msg); \
fprintf(stderr, "libunwind: %s - %s\n", __func__, msg); \
fflush(stderr); \
abort(); \
} while (0)
Expand Down

0 comments on commit 1c70dec

Please sign in to comment.