[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

llvm-svn: 334522
This commit is contained in:
Walter Lee 2018-06-12 18:34:12 +00:00
parent ce25bc3e82
commit 0a58f9c953
1 changed files with 5 additions and 2 deletions

View File

@ -239,8 +239,11 @@ bool IsAccessibleMemoryRange(uptr beg, uptr size) {
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);