[PATCH] [ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs.
Yury Gribov
tetra2005 at gmail.com
Thu Jan 29 22:20:23 PST 2015
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7172
Files:
compiler-rt/trunk/lib/asan/asan_report.cc
compiler-rt/trunk/lib/msan/msan_interceptors.cc
Index: compiler-rt/trunk/lib/asan/asan_report.cc
===================================================================
--- compiler-rt/trunk/lib/asan/asan_report.cc
+++ compiler-rt/trunk/lib/asan/asan_report.cc
@@ -53,7 +53,7 @@
buffer, remaining);
error_message_buffer[error_message_buffer_size - 1] = '\0';
// FIXME: reallocate the buffer instead of truncating the message.
- error_message_buffer_pos += remaining > length ? length : remaining;
+ error_message_buffer_pos += Min(remaining, length);
}
}
Index: compiler-rt/trunk/lib/msan/msan_interceptors.cc
===================================================================
--- compiler-rt/trunk/lib/msan/msan_interceptors.cc
+++ compiler-rt/trunk/lib/msan/msan_interceptors.cc
@@ -952,7 +952,7 @@
__msan_unpoison(buf, res);
if (srcaddr) {
SIZE_T sz = *addrlen;
- __msan_unpoison(srcaddr, (sz < srcaddr_sz) ? sz : srcaddr_sz);
+ __msan_unpoison(srcaddr, Min(sz, srcaddr_sz));
}
}
return res;
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7172.19023.patch
Type: text/x-patch
Size: 1026 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150130/9c8a3d33/attachment.bin>
More information about the llvm-commits
mailing list