Use-after-return sanitizer binary metadata
authorDmitry Vyukov <dvyukov@google.com>
Mon, 17 Oct 2022 13:13:56 +0000 (15:13 +0200)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 29 Nov 2022 16:37:36 +0000 (17:37 +0100)
commita1255dc467f7ce57a966efa76bbbb4ee91d9115a
tree30a4b427be1cd1857f76830719e4854d05d48727
parentdca1a3f29e82708d2195951c87474ef3617a041e
Use-after-return sanitizer binary metadata

Currently per-function metadata consists of:
(start-pc, size, features)

This adds a new UAR feature and if it's set an additional element:
(start-pc, size, features, stack-args-size)

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D136078
20 files changed:
clang/include/clang/Basic/CodeGenOptions.def
clang/include/clang/Basic/CodeGenOptions.h
clang/include/clang/Driver/Options.td
clang/lib/CodeGen/BackendUtil.cpp
clang/lib/Driver/SanitizerArgs.cpp
llvm/include/llvm/CodeGen/CodeGenPassBuilder.h
llvm/include/llvm/CodeGen/MachinePassRegistry.def
llvm/include/llvm/CodeGen/Passes.h
llvm/include/llvm/InitializePasses.h
llvm/include/llvm/Transforms/Instrumentation.h
llvm/include/llvm/Transforms/Instrumentation/SanitizerBinaryMetadata.h
llvm/lib/CodeGen/CMakeLists.txt
llvm/lib/CodeGen/CodeGen.cpp
llvm/lib/CodeGen/SanitizerBinaryMetadata.cpp [new file with mode: 0644]
llvm/lib/CodeGen/TargetPassConfig.cpp
llvm/lib/Transforms/Instrumentation/SanitizerBinaryMetadata.cpp
llvm/test/Instrumentation/SanitizerBinaryMetadata/common.h [new file with mode: 0644]
llvm/test/Instrumentation/SanitizerBinaryMetadata/covered.cpp [new file with mode: 0644]
llvm/test/Instrumentation/SanitizerBinaryMetadata/lit.local.cfg [new file with mode: 0644]
llvm/test/Instrumentation/SanitizerBinaryMetadata/uar.cpp [new file with mode: 0644]