[compiler-rt] r334522 - [asan, myriad] Support environment variables
Walter Lee via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 12 11:34:12 PDT 2018
Author: waltl
Date: Tue Jun 12 11:34:12 2018
New Revision: 334522
URL: http://llvm.org/viewvc/llvm-project?rev=334522&view=rev
Log:
[asan, myriad] Support environment variables
Provide a buffer that the test harness can write into to provide
values for the environment variables. Format is a null-separated list
of VAR=value pairs; this is sufficent for our purpose.
Differential Revision: https://reviews.llvm.org/D47960
Modified:
compiler-rt/trunk/lib/sanitizer_common/sanitizer_rtems.cc
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_rtems.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_rtems.cc?rev=334522&r1=334521&r2=334522&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_rtems.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_rtems.cc Tue Jun 12 11:34:12 2018
@@ -239,8 +239,11 @@ bool IsAccessibleMemoryRange(uptr beg, u
return true;
}
-char **GetArgv() { return NULL; }
-const char *GetEnv(const char *name) { return NULL; }
+char **GetArgv() { return nullptr; }
+
+const char *GetEnv(const char *name) {
+ return getenv(name);
+}
uptr ReadBinaryName(/*out*/char *buf, uptr buf_len) {
internal_strncpy(buf, "StubBinaryName", buf_len);
More information about the llvm-commits
mailing list