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/sanitizer_common use the...



details:   https://anonhg.NetBSD.org/src/rev/0dd11e347380
branches:  trunk
changeset: 349235:0dd11e347380
user:      christos <christos%NetBSD.org@localhost>
date:      Thu Dec 01 18:19:19 2016 +0000

description:
use the right sysctl to find the main binary name. We don't really need
this since our dl_iterate_phdr DTRT's for objmain, but...

diffstat:

 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc |  4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diffs (15 lines):

diff -r fb5552eb76e3 -r 0dd11e347380 external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc
--- a/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc   Thu Dec 01 15:39:02 2016 +0000
+++ b/external/gpl3/gcc/dist/libsanitizer/sanitizer_common/sanitizer_linux.cc   Thu Dec 01 18:19:19 2016 +0000
@@ -751,7 +751,11 @@
     return module_name_len;
   }
 #if SANITIZER_FREEBSD || SANITIZER_NETBSD
+# if SANITIZER_FREEBSD
   const int Mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 };
+# else
+  const int Mib[4] = { CTL_KERN, KERN_PROC_ARGS, -1, KERN_PROC_PATHNAME };
+# endif
   size_t Size = buf_len;
   bool IsErr = (sysctl(Mib, 4, buf, &Size, NULL, 0) != 0);
   int readlink_error = IsErr ? errno : 0;



Home | Main Index | Thread Index | Old Index