]> Savannah Git Hosting - gnulib.git/commitdiff
doc: document -static-libubsan more
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Dec 2020 18:03:37 +0000 (10:03 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 6 Dec 2020 18:04:37 +0000 (10:04 -0800)
* doc/gnulib-readme.texi (High Quality): Document pros and cons of
-static-libubsan a bit more.  Mostly cons.

ChangeLog
doc/gnulib-readme.texi

index 08cef4d15174a919f091421e17cdaf2dfdd72bff..14a2ea95702dbc027eda5b0907eb91c00b4c0b01 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-12-06  Paul Eggert  <eggert@cs.ucla.edu>
+
+       doc: document -static-libubsan more
+       * doc/gnulib-readme.texi (High Quality): Document pros and cons of
+       -static-libubsan a bit more.  Mostly cons.
+
 2020-12-06  Bruno Haible  <bruno@clisp.org>
 
        doc: Add more details regarding the undefined behaviour sanitizer.
index cde6d7aaba32e726813b2d3d14d75b326f16cab9..833888320cae6dec75ccdabf46f93c6a978579be 100644 (file)
@@ -559,8 +559,16 @@ the GNU C library.
 @code{-fsanitize-undefined-trap-on-error} causes @code{ubsan} to
 abort the program (through an ``illegal instruction'' signal).  This
 measure stops exploit attempts and also allows you to debug the issue.
-Without this option, @code{-fsanitize=undefined} causes messages to be
-printed, execution continues after an undefined behavior situation, and
-GCC links the program against @code{libstdc++} (which you can avoid
-through the option @code{-static-libubsan}).
 @end itemize
+
+Without the @code{-fsanitize-undefined-trap-on-error} option,
+@code{-fsanitize=undefined} causes messages to be printed, and
+execution continues after an undefined behavior situation.
+The message printing causes GCC-like compilers to arrange for the
+program to dynamically link to libraries it might not otherwise need.
+With GCC, instead of @code{-fsanitize-undefined-trap-on-error} you can
+use the @code{-static-libubsan} option to arrange for two of the extra
+libraries (@code{libstdc++} and @code{libubsan}) to be linked
+statically rather than dynamically, though this typically bloats the
+executable and the remaining extra libraries are still linked
+dynamically.