This is an archive of the discontinued LLVM Phabricator instance.

[hwasan] Remove system allocator fallback.
ClosedPublic

Authored by eugenis on Oct 18 2019, 2:48 PM.

Details

Summary

This has been an experiment with late malloc interposition, made
possible by a non-standard feature of the Android dynamic loader.

Event Timeline

eugenis created this revision.Oct 18 2019, 2:48 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptOct 18 2019, 2:48 PM
Herald added subscribers: Restricted Project, srhines. · View Herald Transcript
pcc accepted this revision.Oct 18 2019, 3:16 PM

LGTM

This revision is now accepted and ready to land.Oct 18 2019, 3:16 PM
This revision was automatically updated to reflect the committed changes.

If late interposition is no longer a supported use-case, does that apply to the pthread use case as well?
https://reviews.llvm.org/D56038

I would be quite keen to remove the lazy thread-initialisation check from every function prologue.

Indeed, it looks like all that complexity is no longer needed.
@pcc to confirm that there are no hidden dependencies.

It should be fine to remove the late-init instrumentation and reinstate the pthread_create interceptor.

compiler-rt/lib/hwasan/hwasan_interceptors.cpp