Page MenuHomePhabricator

[GWP-ASan] Fix PRNG to use IE TLS.

Authored by hctim on Feb 6 2020, 8:38 AM.



GWP-ASan's PRNG didn't use Initial-Exec TLS. Fix that to ensure that we don't
have infinite recursion, and also that we don't allocate a DTV on Android when
GWP-ASan is touched.

Test coverage ensuring that the sample counter is UINT32_MAX for an
uninitialised GWP-ASan is provided by gwp_asan/tests/late_init.cpp.

Diff Detail

Event Timeline

hctim created this revision.Feb 6 2020, 8:38 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptFeb 6 2020, 8:38 AM
Herald added subscribers: llvm-commits, Restricted Project. · View Herald Transcript
hctim updated this revision to Diff 242930.Feb 6 2020, 9:39 AM
  • Updated magic constant.
pcc accepted this revision.Feb 6 2020, 10:01 AM


This revision is now accepted and ready to land.Feb 6 2020, 10:01 AM
This revision was automatically updated to reflect the committed changes.