Page MenuHomePhabricator

[GWP-ASan] Attempt to fix Android/ARM platforms.
Needs ReviewPublic

Authored by hctim on Jul 9 2019, 5:18 PM.

Details

Reviewers
cryptoad
eugenis
Summary

This patch re-enabled GWP-ASan for Android and other ARM platforms. It does two
things:

  1. Adds -fno-emulated-tls, as the clang driver still default compiles using emulated TLS on Android.
  2. Also uses sanitizer common unwinder on Android, as glibc backtrace() isn't available.

This patch should be monitored closely when submitting. I don't have the ARM32
machines that the patches initially broke to verify that this fixes the
problem, but it's a good attempt.

Event Timeline

hctim created this revision.Jul 9 2019, 5:18 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJul 9 2019, 5:18 PM
Herald added subscribers: llvm-commits, Restricted Project, jfb and 5 others. · View Herald Transcript

LGTM

This adds sanitizer_common libraries to scudo_minimal (but not to scudo_standalone). Is it OK with you, Kostya?

It's OK with me. Part of the reason for splitting out the symbolizer was some memory overhead as well, which we probably want to look into.
Is COMPILER_RT_HAS_GWP_ASAN going to be true by default for Android? If so we probably should loop in the toolchain team so that there is no surprise on their next toolchain update.