This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Add entire report to abort message on Android.
ClosedPublic

Authored by eugenis on Nov 8 2018, 4:26 PM.

Details

Summary

When reporting a fatal error, collect and add the entire report text to
android_set_abort_message so that it can be found in the tombstone.

Diff Detail

Repository
rL LLVM

Event Timeline

eugenis created this revision.Nov 8 2018, 4:26 PM
kcc added inline comments.Nov 8 2018, 6:46 PM
compiler-rt/lib/hwasan/hwasan_report.cc
68 ↗(On Diff #173246)

why not InternalScopedString ?

eugenis added inline comments.Nov 9 2018, 9:05 AM
compiler-rt/lib/hwasan/hwasan_report.cc
68 ↗(On Diff #173246)

I don't like InternalScopedString. Its append method truncates the string instead of resizing the storage, and also does unnecessary format string parsing.

kcc added inline comments.Nov 9 2018, 12:41 PM
compiler-rt/lib/hwasan/hwasan_report.cc
68 ↗(On Diff #173246)

ack.
I'd prefer to add append() method to InternalMmapVector then and use it here

kcc accepted this revision.Nov 9 2018, 1:36 PM

LGTM

compiler-rt/lib/hwasan/hwasan_report.cc
68 ↗(On Diff #173246)

actually, up to you.

This revision is now accepted and ready to land.Nov 9 2018, 1:36 PM
This revision was automatically updated to reflect the committed changes.