forked from OSchip/llvm-project
tsan: check if PWD env var is absent
On some programs I see: failed to open suppressions file '<null>/testing/tsan/v2/tsan.supp' llvm-svn: 169230
This commit is contained in:
parent
f3d587ea7c
commit
d229abe49a
|
@ -27,7 +27,7 @@ static char *ReadFile(const char *filename) {
|
|||
if (filename == 0 || filename[0] == 0)
|
||||
return 0;
|
||||
InternalScopedBuffer<char> tmp(4*1024);
|
||||
if (filename[0] == '/')
|
||||
if (filename[0] == '/' || GetPwd() == 0)
|
||||
internal_snprintf(tmp.data(), tmp.size(), "%s", filename);
|
||||
else
|
||||
internal_snprintf(tmp.data(), tmp.size(), "%s/%s", GetPwd(), filename);
|
||||
|
|
Loading…
Reference in New Issue