[all-commits] [llvm/llvm-project] affb13: hwasan: Move stack ring buffer initialization befo...

pcc via All-commits all-commits at lists.llvm.org
Tue Aug 17 10:18:36 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: affb132ab89f0acffcbaf20b9357bf9e966985fe
      https://github.com/llvm/llvm-project/commit/affb132ab89f0acffcbaf20b9357bf9e966985fe
  Author: Peter Collingbourne <peter at pcc.me.uk>
  Date:   2021-08-17 (Tue, 17 Aug 2021)

  Changed paths:
    M compiler-rt/lib/hwasan/hwasan_thread.cpp

  Log Message:
  -----------
  hwasan: Move stack ring buffer initialization before InitStackAndTls.

D104248 moved the call to GetThreadStackAndTls to before the
initialization of the ring buffer TLS slot. As a result, if libc
is instrumented we crash in pthread_getattr_np which is called from
__sanitizer::GetThreadStackTopAndBottom.

Fix the problem by moving the stack ring buffer initialization before
the call to InitStackAndTls.

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




More information about the All-commits mailing list