This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs.
ClosedPublic

Authored by ygribov on Jan 26 2015, 12:56 AM.

Details

Summary

This is a second try on http://reviews.llvm.org/D5724 which was approved and commited but later reverted after causing bugs in upstream. This patch is mostly identical (except for fixing the issue for OSX and rebasing). It relies on BlockinMutex patch in http://reviews.llvm.org/D7171

Diff Detail

Repository
rL LLVM

Event Timeline

ygribov updated this revision to Diff 18744.Jan 26 2015, 12:56 AM
ygribov retitled this revision from to [ASan] Add process basename to log name and error message to simplify analysis of sanitized systems logs..
ygribov updated this object.
ygribov edited the test plan for this revision. (Show Details)
ygribov added reviewers: kcc, samsonov.
ygribov set the repository for this revision to rL LLVM.
ygribov added subscribers: Unknown Object (MLST), kubamracek, dblaikie.

Tested on Linux x64, both with and without LLVM_BUILD_EXTERNAL_COMPILER_RT=ON.

samsonov added inline comments.Jan 28 2015, 3:19 PM
lib/asan/asan_report.cc
56

Feel free to commit this part separately in a cleanup CL.

lib/sanitizer_common/sanitizer_common.cc
224

I forgot, why do you need this?

lib/sanitizer_common/sanitizer_linux.cc
754

Use default_module_name here.

lib/sanitizer_common/sanitizer_printf.cc
258

Hm, do we really want this? I believe some users may scrape logs by searching for ==%d== prefix.

test/asan/TestCases/verbose-log-path_test.cc
1

Why do you need this?

12

This test will not be run on Windows anyway - verbose-log-path is not set there.

ygribov added inline comments.Jan 29 2015, 9:40 AM
lib/sanitizer_common/sanitizer_common.cc
224

It's for Windows.

lib/sanitizer_common/sanitizer_printf.cc
258

Knowing pname may be useful when output from multiple processes gets printed into stderr. Perhaps do ==%d==%s==?

test/asan/TestCases/verbose-log-path_test.cc
1

I simply copy-pasted this from log-path_test.cc and thought that it's better to avoid changes. I could remove useless stuff if necessary.

12

Ditto.

This revision was automatically updated to reflect the committed changes.

Yikes, looks like I accidentally closed this by a partial cleanup commit. Should I create a new review?

lib/asan/asan_report.cc
56

Landed in 227559.