Changes

Summary

  1. LLVM Detailed IR tests for introduction of flag -fsanitize-address-detect-stack-use-after-return-mode. (details)
  2. [sanitizer] Let glibc aarch64 use O(1) GetTls (details)
  3. [OpaquePtr] Create new bitcode encoding for atomicrmw (details)
  4. [LTT] Handle merged llvm.assume when dropping type tests (details)
  5. [lldb] Avoid format string in LLDB_SCOPED_TIMER (details)
  6. Revert "[lldb] Avoid format string in LLDB_SCOPED_TIMER" (details)
Commit 52ac1147713db35f6ff644fc8a40f08944ce3292 by kda
LLVM Detailed IR tests for introduction of flag -fsanitize-address-detect-stack-use-after-return-mode.

Rework all tests that interact with use after return to correctly handle the case where the mode has been explicitly set to Never or Always.

for issue: https://github.com/google/sanitizers/issues/1394

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D102462
The file was modifiedllvm/test/Instrumentation/AddressSanitizer/lifetime-uar-uas.ll
The file was modifiedllvm/include/llvm/Transforms/Instrumentation/AddressSanitizerOptions.h
The file was modifiedllvm/test/Instrumentation/AddressSanitizer/fake-stack.ll
The file was modifiedllvm/test/Instrumentation/AddressSanitizer/localescape.ll
The file was modifiedllvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll
The file was modifiedllvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
The file was modifiedllvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
Commit e67259531d7385fece6873b1da57e7cf84f110b3 by i
[sanitizer] Let glibc aarch64 use O(1) GetTls

The generic approach can still be used by musl and FreeBSD. Note: on glibc
2.31, TLS_PRE_TCB_SIZE is 0x700, larger than ThreadDescriptorSize() by 16, but
this is benign: as long as the range includes pthread::{specific_1stblock,specific}
pthread_setspecific will not cause false positives.

Note: the state before afec953857ffd682cb4119e7950f3593efbaaa81 underestimated
the TLS size a lot (nearly ThreadDescriptorSize() = 1776).
That may explain why afec953857ffd682cb4119e7950f3593efbaaa81 actually made some
tests pass.
The file was modifiedcompiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
Commit ad90a6be219a547873beb80f977e45e23e9247ac by aeubanks
[OpaquePtr] Create new bitcode encoding for atomicrmw

Since the opaque pointer type won't contain the pointee type, we need to
separately encode the value type for an atomicrmw.

Emit this new code for atomicrmw.

Handle this new code and the old one in the bitcode reader.

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D103123
The file was modifiedllvm/include/llvm/Bitcode/LLVMBitCodes.h
The file was addedllvm/test/Bitcode/atomicrmw-upgrade.ll
The file was modifiedllvm/lib/Bitcode/Writer/BitcodeWriter.cpp
The file was modifiedllvm/lib/Bitcode/Reader/BitcodeReader.cpp
The file was addedllvm/test/Bitcode/atomicrmw-upgrade.ll.bc
Commit d35fe04fa35a080cb024ecb56db67dc822c70740 by tejohnson
[LTT] Handle merged llvm.assume when dropping type tests

When the lower type test pass is invoked a second time with
DropTypeTests set to true, it expects that all remaining type tests feed
assume instructions, which are removed along with the type tests.

In some cases the llvm.assume might have been merged with another one,
i.e. from a builtin_assume instruction, in which case the type test
would actually feed a phi that in turn feeds the merged assume
instruction. In this case we can simply replace that operand of the phi
with "true" before removing the type test.

Differential Revision: https://reviews.llvm.org/D103073
The file was modifiedllvm/lib/Transforms/IPO/LowerTypeTests.cpp
The file was addedllvm/test/Transforms/LowerTypeTests/drop_type_test_phi.ll
Commit bbcb3433d4e8f5fa385b14e74d4314bd5409022d by Jonas Devlieghere
[lldb] Avoid format string in LLDB_SCOPED_TIMER

Pass LLVM_PRETTY_FUNCTION directly for the no-argument macro.
The file was modifiedlldb/include/lldb/Utility/Timer.h
Commit 564eb20e0deecd173a7b990dcfd0e57fb045c522 by Jonas Devlieghere
Revert "[lldb] Avoid format string in LLDB_SCOPED_TIMER"

Right after pushing, I remembered that this was added to silence a GCC
warning (https://reviews.llvm.org/D99120). This reverts my patch and
adds a comment.
The file was modifiedlldb/include/lldb/Utility/Timer.h