Author: Leonard Chan
Date: 2020-03-10T18:58:41-07:00
New Revision: 1c70dec18c7e530264cc70841cc60f385259b9e0

URL: 
https://github.com/llvm/llvm-project/commit/1c70dec18c7e530264cc70841cc60f385259b9e0
DIFF: 
https://github.com/llvm/llvm-project/commit/1c70dec18c7e530264cc70841cc60f385259b9e0.diff

LOG: [libunwind] Remove __FILE__ and __LINE__ from error reporting

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

Added: 
    

Modified: 
    libunwind/src/config.h

Removed: 
    


################################################################################
diff  --git a/libunwind/src/config.h b/libunwind/src/config.h
index dcd3cef94552..5658b3210cf3 100644
--- a/libunwind/src/config.h
+++ b/libunwind/src/config.h
@@ -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)


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to