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/libsanitizer/asan Ignore the first dl...



details:   https://anonhg.NetBSD.org/src/rev/76eba10e281e
branches:  trunk
changeset: 815692:76eba10e281e
user:      christos <christos%NetBSD.org@localhost>
date:      Wed Jun 01 00:53:35 2016 +0000

description:
Ignore the first dlpi entry which is ourselves on NetBSD instead of having
a NULL name as on linux.

diffstat:

 external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc |  9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diffs (19 lines):

diff -r 901bead239d4 -r 76eba10e281e external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc
--- a/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc    Wed Jun 01 00:49:44 2016 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/asan/asan_linux.cc    Wed Jun 01 00:53:35 2016 +0000
@@ -95,6 +95,15 @@
   if (internal_strncmp(info->dlpi_name, "linux-", sizeof("linux-") - 1) == 0)
     return 0;
 
+#if SANITIZER_NETBSD
+  // Ignore first entry (the main program)
+  char **p = (char **)data;
+  if (*p == NULL) {
+    *p = (char *)-1;
+    return 0;
+  }
+#endif
+
   *(const char **)data = info->dlpi_name;
   return 1;
 }



Home | Main Index | Thread Index | Old Index