[all-commits] [llvm/llvm-project] 25de3f: [GWP-ASan] Fix PRNG to use IE TLS.

Mitch Phillips via All-commits all-commits at lists.llvm.org
Thu Feb 6 10:08:37 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 25de3f98b8a7436404dbc185040645f2549a8a8f
      https://github.com/llvm/llvm-project/commit/25de3f98b8a7436404dbc185040645f2549a8a8f
  Author: Mitch Phillips <31459023+hctim at users.noreply.github.com>
  Date:   2020-02-06 (Thu, 06 Feb 2020)

  Changed paths:
    M compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
    M compiler-rt/lib/gwp_asan/random.cpp
    M compiler-rt/lib/gwp_asan/random.h

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

Summary:
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.

Reviewers: pcc, cferris

Reviewed By: pcc

Subscribers: #sanitizers, llvm-commits, rprichard, eugenis

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D74135




More information about the All-commits mailing list