[compiler-rt] r232937 - [libsanitizer] Fix OpenFile() usage in TSan and DFSan.
Alexander Potapenko
glider at google.com
Mon Mar 23 03:32:28 PDT 2015
Author: glider
Date: Mon Mar 23 05:32:28 2015
New Revision: 232937
URL: http://llvm.org/viewvc/llvm-project?rev=232937&view=rev
Log:
[libsanitizer] Fix OpenFile() usage in TSan and DFSan.
This is a follow-up for r232936.
Modified:
compiler-rt/trunk/lib/dfsan/dfsan.cc
compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
Modified: compiler-rt/trunk/lib/dfsan/dfsan.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/dfsan.cc?rev=232937&r1=232936&r2=232937&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/dfsan.cc (original)
+++ compiler-rt/trunk/lib/dfsan/dfsan.cc Mon Mar 23 05:32:28 2015
@@ -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);
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc?rev=232937&r1=232936&r2=232937&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_rtl.cc Mon Mar 23 05:32:28 2015
@@ -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]);
More information about the llvm-commits
mailing list