This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Add use_madv_dontdump flag.
ClosedPublic

Authored by ygribov on Jan 30 2015, 5:57 AM.

Details

Summary

This patch implements use_madv_dontdump flag suggested in https://code.google.com/p/address-sanitizer/issues/detail?id=345 . The flag disables dumping of shadow memory to corefile (which takes hours on 64-bit platforms). Tested on Linux x64.

I didn't add a testcase - generating a predictable corefile is hard given the zoo of modern crash reporters. E.g. see https://bugs.launchpad.net/ubuntu/+source/apport/+bug/1346497 (Apport from stock Ubuntu 14 multiples core limit by 1000).

Diff Detail

Repository
rL LLVM

Event Timeline

ygribov updated this revision to Diff 19035.Jan 30 2015, 5:57 AM
ygribov retitled this revision from to [ASan] Add use_madv_dontdump flag..
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 a subscriber: Unknown Object (MLST).

Perhaps also disable_core=0 on 64-bit in this patch?

kcc added inline comments.Jan 30 2015, 8:50 AM
lib/asan/asan_flags.inc
80 ↗(On Diff #19035)

Please move the flag to sanitizer_common.
Even if you then use it only in asan, we may later want to use it in msan/tsan
(but you are welcome to implement that too, of course)

ygribov updated this revision to Diff 19129.Feb 2 2015, 12:08 AM

Also implement for MSan and TSan.

kcc accepted this revision.Feb 2 2015, 11:16 AM
kcc edited edge metadata.

LGTM
Thanks!

This revision is now accepted and ready to land.Feb 2 2015, 11:16 AM
This revision was automatically updated to reflect the committed changes.