This is an archive of the discontinued LLVM Phabricator instance.

[ASan] Make stack-buffer-overflow reports more robust
ClosedPublic

Authored by samsonov on Sep 30 2014, 5:50 PM.

Details

Summary

Fix the function that gets stack frame description by address in
thread stack, so that it clearly indicates failures. Make this error non-fatal,
and print as much information as we can in this case. Make all errors in
ParseFrameDescription non-fatal.

Diff Detail

Event Timeline

samsonov updated this revision to Diff 14257.Sep 30 2014, 5:50 PM
samsonov updated this revision to Diff 14258.
samsonov retitled this revision from to [ASan] Make stack-buffer-overflow reports more robust.
samsonov updated this object.
samsonov edited the test plan for this revision. (Show Details)
samsonov added a reviewer: kcc.
samsonov added a subscriber: Unknown Object (MLST).

Upload correct set of files.

kcc edited edge metadata.Oct 1 2014, 10:24 AM

Is this change testable?

lib/asan/asan_report.cc
458

Isn't this buffer too large? (we may get stack overflow while reporting)

Testing this is hard. I've tested this change on a large program with racy use-after-return, and failed to reproduce this in a small test case.

lib/asan/asan_report.cc
458

Yeah, we may get rid of this buffer completely. I'll address this in a separate change.

kcc accepted this revision.Oct 1 2014, 2:12 PM
kcc edited edge metadata.

LGTM

This revision is now accepted and ready to land.Oct 1 2014, 2:12 PM
samsonov closed this revision.Oct 1 2014, 2:22 PM
samsonov added inline comments.Oct 1 2014, 2:39 PM
lib/asan/asan_report.cc
458

Done in r218827.