[all-commits] [llvm/llvm-project] f751a7: scudo: Only use the Android reserved TLS slot when...

pcc via All-commits all-commits at lists.llvm.org
Wed Nov 20 11:33:50 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: f751a79173958526b8e8793d4e4c84b2d33dc662
      https://github.com/llvm/llvm-project/commit/f751a79173958526b8e8793d4e4c84b2d33dc662
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2019-11-20 (Wed, 20 Nov 2019)

  Changed paths:
    M compiler-rt/lib/scudo/standalone/CMakeLists.txt
    M compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
    M compiler-rt/lib/scudo/standalone/tsd_shared.h

  Log Message:
  -----------
  scudo: Only use the Android reserved TLS slot when building libc's copy of the allocator.

When we're not building libc's allocator, just use a regular TLS variable. This
lets the unit tests pass on Android devices whose libc uses Scudo. Otherwise
libc's copy of Scudo and the unit tests' copy will both try to use the same
TLS slot, in likely incompatible ways.

This requires using ELF TLS, so start passing -fno-emulated-tls when building
the library and the unit tests on Android.

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




More information about the All-commits mailing list