1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/IR
Peter Collingbourne 93adc422a8 hwasan: Add a tag_offset DWARF attribute to instrumented stack variables.
The goal is to improve hwasan's error reporting for stack use-after-return by
recording enough information to allow the specific variable that was accessed
to be identified based on the pointer's tag. Currently we record the PC and
lower bits of SP for each stack frame we create (which will eventually be
enough to derive the base tag used by the stack frame) but that's not enough
to determine the specific tag for each variable, which is the stack frame's
base tag XOR a value (the "tag offset") that is unique for each variable in
a function.

In IR, the tag offset is most naturally represented as part of a location
expression on the llvm.dbg.declare instruction. However, the presence of the
tag offset in the variable's actual location expression is likely to confuse
debuggers which won't know about tag offsets, and moreover the tag offset
is not required for a debugger to determine the location of the variable on
the stack, so at the DWARF level it is represented as an attribute so that
it will be ignored by debuggers that don't know about it.

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

llvm-svn: 363635
2019-06-17 23:39:41 +00:00
..
AbstractCallSite.cpp
AsmWriter.cpp Revert r361953 "[SVE][IR] Scalable Vector IR Type" 2019-06-09 19:27:50 +00:00
AttributeImpl.h Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
Attributes.cpp Reapply: IR: add optional type to 'byval' function parameters 2019-05-30 18:48:23 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp Change semantics of fadd/fmul vector reductions. 2019-06-11 08:22:10 +00:00
BasicBlock.cpp
CMakeLists.txt
Comdat.cpp
ConstantFold.cpp
ConstantFold.h
ConstantRange.cpp [ConstantRange] Add sdiv() support 2019-06-03 18:19:54 +00:00
Constants.cpp
ConstantsContext.h
Core.cpp
DataLayout.cpp
DebugInfo.cpp
DebugInfoMetadata.cpp hwasan: Add a tag_offset DWARF attribute to instrumented stack variables. 2019-06-17 23:39:41 +00:00
DebugLoc.cpp
DiagnosticHandler.cpp
DiagnosticInfo.cpp [Remarks][NFC] Move the serialization to lib/Remarks 2019-05-30 21:45:59 +00:00
DiagnosticPrinter.cpp
DIBuilder.cpp
Dominators.cpp
Function.cpp Improve reduction intrinsics by overloading result value. 2019-06-13 09:37:38 +00:00
Globals.cpp Add IR support, ELF section and user documentation for partitioning feature. 2019-05-29 03:29:01 +00:00
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp
Instructions.cpp Silenced a warning "implicit conversion turns string literal into bool" introduced in r362473 2019-06-04 09:31:07 +00:00
IntrinsicInst.cpp
IRBuilder.cpp Improve reduction intrinsics by overloading result value. 2019-06-13 09:37:38 +00:00
IRPrintingPasses.cpp
LegacyPassManager.cpp
LLVMBuild.txt
LLVMContext.cpp
LLVMContextImpl.cpp
LLVMContextImpl.h Revert r361953 "[SVE][IR] Scalable Vector IR Type" 2019-06-09 19:27:50 +00:00
Mangler.cpp
MDBuilder.cpp
Metadata.cpp
MetadataImpl.h
Module.cpp
ModuleSummaryIndex.cpp
Operator.cpp
OptBisect.cpp
Pass.cpp
PassInstrumentation.cpp
PassManager.cpp
PassRegistry.cpp
PassTimingInfo.cpp
ProfileSummary.cpp
RemarkStreamer.cpp [Remarks] Extend -fsave-optimization-record to specify the format 2019-06-17 16:06:00 +00:00
SafepointIRVerifier.cpp
Statepoint.cpp
SymbolTableListTraitsImpl.h
Type.cpp Revert r361953 "[SVE][IR] Scalable Vector IR Type" 2019-06-09 19:27:50 +00:00
TypeFinder.cpp
Use.cpp
User.cpp
Value.cpp Introduce Value::stripPointerCastsSameRepresentation 2019-06-04 20:21:46 +00:00
ValueSymbolTable.cpp
Verifier.cpp [IntrinsicEmitter] Extend argument overloading with forward references. 2019-06-13 08:19:33 +00:00