[compiler-rt] r324481 - Correct a bug in GetArgsAndEnv() for NetBSD
Kamil Rytarowski via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 7 06:05:58 PST 2018
Author: kamil
Date: Wed Feb 7 06:05:57 2018
New Revision: 324481
URL: http://llvm.org/viewvc/llvm-project?rev=324481&view=rev
Log:
Correct a bug in GetArgsAndEnv() for NetBSD
Fix setting envp.
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc?rev=324481&r1=324480&r2=324481&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_linux.cc Wed Feb 7 06:05:57 2018
@@ -568,7 +568,7 @@ static void GetArgsAndEnv(char ***argv,
*envp = pss->ps_envstr;
#elif SANITIZER_NETBSD
*argv = __ps_strings->ps_argvstr;
- *argv = __ps_strings->ps_envstr;
+ *envp = __ps_strings->ps_envstr;
#else
#if !SANITIZER_GO
if (&__libc_stack_end) {
@@ -1898,4 +1898,3 @@ bool GetRandom(void *buffer, uptr length
#endif // SANITIZER_FREEBSD || SANITIZER_LINUX || SANITIZER_NETBSD ||
// SANITIZER_SOLARIS
-
More information about the llvm-commits
mailing list