forked from OSchip/llvm-project
[libsanitizer] Fix OpenFile() usage in TSan and DFSan.
This is a follow-up for r232936. llvm-svn: 232937
This commit is contained in:
parent
141e420a81
commit
b9c928bd10
|
@ -333,7 +333,7 @@ static void InitializeFlags() {
|
|||
|
||||
static void dfsan_fini() {
|
||||
if (internal_strcmp(flags().dump_labels_at_exit, "") != 0) {
|
||||
fd_t fd = OpenFile(flags().dump_labels_at_exit, true /* write */);
|
||||
fd_t fd = OpenFile(flags().dump_labels_at_exit, WrOnly);
|
||||
if (fd == kInvalidFd) {
|
||||
Report("WARNING: DataFlowSanitizer: unable to open output file %s\n",
|
||||
flags().dump_labels_at_exit);
|
||||
|
|
|
@ -153,7 +153,7 @@ static void BackgroundThread(void *arg) {
|
|||
} else {
|
||||
InternalScopedString filename(kMaxPathLength);
|
||||
filename.append("%s.%d", flags()->profile_memory, (int)internal_getpid());
|
||||
uptr openrv = OpenFile(filename.data(), true);
|
||||
uptr openrv = OpenFile(filename.data(), WrOnly);
|
||||
if (internal_iserror(openrv)) {
|
||||
Printf("ThreadSanitizer: failed to open memory profile file '%s'\n",
|
||||
&filename[0]);
|
||||
|
|
Loading…
Reference in New Issue