[PATCH] [Sanitizer] Fix report_path functionality:
Alexander Potapenko
glider at google.com
Thu Dec 11 06:25:06 PST 2014
Looks generally good, and thanks for the cleanup.
================
Comment at: lib/sanitizer_common/sanitizer_common.h:133
@@ -135,2 +132,3 @@
bool ColorizeReports();
+
void Printf(const char *format, ...);
----------------
Spare newline?
================
Comment at: lib/sanitizer_common/sanitizer_common.h:158
@@ +157,3 @@
+ // kInvalidFd, in which case new file will be opened when necessary.
+ fd_t fd;
+ // Path prefix of report file, set via __sanitizer_set_report_path.
----------------
Are you planning to access these fields from outside ReportFile?
Looks like they can be made private now.
================
Comment at: lib/sanitizer_common/sanitizer_win.cc:495
@@ -494,10 +494,3 @@
-void MaybeOpenReportFile() {
- // Windows doesn't have native fork, and we don't support Cygwin or other
- // environments that try to fake it, so the initial report_fd will always be
- // correct.
-}
-
-void RawWrite(const char *buffer) {
- uptr length = (uptr)internal_strlen(buffer);
- if (length != internal_write(report_fd, buffer, length)) {
+void ReportFile::WriteOrDie(const char *buffer, uptr length) {
+ SpinMutexLock l(mu);
----------------
Isn't this function supposed to die?
http://reviews.llvm.org/D6595
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the llvm-commits
mailing list