Page MenuHomePhabricator

[GWP-ASan] Use weak abort message definition.
ClosedPublic

Authored by hctim on Feb 6 2020, 10:22 AM.

Details

Summary

New shard out of the Check() function for GWP-ASan uses
android_set_abort_message. This is happily present on bionic Android,
but not Android for glibc host x86. Fix up to use the weak definition
always, so we don't have to worry.

Diff Detail

Event Timeline

hctim created this revision.Feb 6 2020, 10:22 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 6 2020, 10:22 AM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
eugenis added inline comments.Feb 6 2020, 10:26 AM
compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp
12–13

Is this include needed?

23

don't just return if the function is not available.
abort()

hctim marked 3 inline comments as done.Feb 6 2020, 10:30 AM
hctim added inline comments.
compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp
12–13

Removed.

hctim updated this revision to Diff 242943.Feb 6 2020, 10:30 AM
hctim marked an inline comment as done.
  • Addressed eugenis@ comments.
eugenis accepted this revision.Feb 6 2020, 10:33 AM

LGTM

This revision is now accepted and ready to land.Feb 6 2020, 10:33 AM
pcc added inline comments.Feb 6 2020, 10:37 AM
compiler-rt/lib/gwp_asan/platform_specific/utilities_posix.cpp
12–13

Who is defining ANDROID? Shouldn't the code be checking __BIONIC__ instead?

This revision was automatically updated to reflect the committed changes.