Module Name:    src
Committed By:   kamil
Date:           Sun Sep 22 23:34:13 UTC 2019

Modified Files:
        src/external/gpl3/gcc/dist/gcc: cppbuiltin.c

Log Message:
Add LSan and UBSan specific preprocessor macros

__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in <sys/cdefs.h>
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.4 -r1.2 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/gpl3/gcc/dist/gcc/cppbuiltin.c
diff -u src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4 src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.2
--- src/external/gpl3/gcc/dist/gcc/cppbuiltin.c:1.1.1.4	Sat Jan 19 10:14:18 2019
+++ src/external/gpl3/gcc/dist/gcc/cppbuiltin.c	Sun Sep 22 23:34:13 2019
@@ -93,6 +93,12 @@ define_builtin_macros_for_compilation_fl
   if (flag_sanitize & SANITIZE_ADDRESS)
     cpp_define (pfile, "__SANITIZE_ADDRESS__");
 
+  if (flag_sanitize & SANITIZE_UNDEFINED)
+    cpp_define (pfile, "__SANITIZE_UNDEFINED__");
+
+  if (flag_sanitize & SANITIZE_LEAK)
+    cpp_define (pfile, "__SANITIZE_LEAK__");
+
   if (flag_sanitize & SANITIZE_THREAD)
     cpp_define (pfile, "__SANITIZE_THREAD__");
 

Reply via email to