Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/external/gpl3/gcc/dist/gcc Add LSan and UBSan specific prepr...



details:   https://anonhg.NetBSD.org/src/rev/ec596c96d614
branches:  trunk
changeset: 965578:ec596c96d614
user:      kamil <kamil%NetBSD.org@localhost>
date:      Sun Sep 22 23:34:13 2019 +0000

description:
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.

diffstat:

 external/gpl3/gcc/dist/gcc/cppbuiltin.c |  6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diffs (16 lines):

diff -r de2d669c33a5 -r ec596c96d614 external/gpl3/gcc/dist/gcc/cppbuiltin.c
--- a/external/gpl3/gcc/dist/gcc/cppbuiltin.c   Sun Sep 22 23:23:12 2019 +0000
+++ b/external/gpl3/gcc/dist/gcc/cppbuiltin.c   Sun Sep 22 23:34:13 2019 +0000
@@ -93,6 +93,12 @@
   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__");
 



Home | Main Index | Thread Index | Old Index