[ASan] Fix TLS teardown.
authorMitch Phillips <31459023+hctim@users.noreply.github.com>
Thu, 17 Feb 2022 21:27:13 +0000 (13:27 -0800)
committerMitch Phillips <31459023+hctim@users.noreply.github.com>
Thu, 17 Feb 2022 21:34:36 +0000 (13:34 -0800)
commit62914bad46cf0b010e3277197dc3114fdf0d8b79
treebc286ceed074b40a1126e319804e5945c8ab5b56
parent1689b1092ebb2c630f8ef1d3880a9fb4808d16fa
[ASan] Fix TLS teardown.

TLS teardown is currently broken, as we unpoison the shadow a little bit
and to the right of the TLS section, rather than the full TLS section
itself. This currently breaks at -O0, and breaks with some upcoming
globals code that I have.

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D120080
compiler-rt/lib/asan/asan_thread.cpp
compiler-rt/test/asan/TestCases/Linux/unpoison_tls.cpp