llvm-project/llvm/lib
Peter Collingbourne c201f27225 hwasan: Emit the globals note even when globals are uninstrumented.
This lets us support the scenario where a binary is linked from a mix
of object files with both instrumented and non-instrumented globals.
This is likely to occur on Android where the decision of whether to use
instrumented globals is based on the API level, which is user-facing.

Previously, in this scenario, it was possible for the comdat from
one of the object files with non-instrumented globals to be selected,
and since this comdat did not contain the note it would mean that the
note would be missing in the linked binary and the globals' shadow
memory would be left uninitialized, leading to a tag mismatch failure
at runtime when accessing one of the instrumented globals.

It is harmless to include the note when targeting a runtime that does
not support instrumenting globals because it will just be ignored.

Differential Revision: https://reviews.llvm.org/D85871
2020-08-13 16:33:22 -07:00
..
Analysis [BPI] Improve static heuristics for integer comparisons 2020-08-13 19:54:27 +02:00
AsmParser [LLParser,NFC] Simplify forward GV refs update 2020-08-06 19:18:51 -07:00
BinaryFormat [DebugInfo] Allow GNU macro extension to be read 2020-08-11 13:30:52 +02:00
Bitcode [SystemZ/ZOS] Add binary format goff and operating system zos to the triple 2020-08-11 05:26:26 -04:00
Bitstream [Bitcode] reserve in front of push_back loops. NFCI. 2020-05-01 15:52:53 +02:00
CodeGen [NewPM][CodeGen] Add machine code verification callback 2020-08-13 16:13:01 -07:00
DWARFLinker [Clang] Restore replace_path_prefix instead of startswith 2020-05-13 13:49:14 -04:00
DebugInfo [llvm-dwarfdump] Avoid crashing if an abbreviation offset is invalid. 2020-08-12 16:01:53 +07:00
Demangle [NFC] Use std::free instead of ::free 2020-07-20 16:19:08 -04:00
ExecutionEngine [ORC][NFC] Fix typo in comment 2020-08-13 21:14:20 +02:00
Extensions Update compiler extension integration into the build system 2020-04-24 09:40:14 +02:00
Frontend [OpenMP][NFC] Reuse OMPIRBuilder `struct ident_t` handling in Clang 2020-08-10 17:13:26 -05:00
FuzzMutate [NewPM][LSR] Rename strength-reduce -> loop-reduce 2020-07-02 11:15:29 -07:00
Fuzzer
IR [X86][ELF] Prefer lowering MC_GlobalAddress operands to .Lfoo$local for STV_DEFAULT only 2020-08-14 00:09:15 +01:00
IRReader Infer alignment of unmarked loads in IR/bitcode parsing. 2020-05-14 13:03:50 -07:00
InterfaceStub [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
LTO [NewPM] Support optnone under new pass manager 2020-07-21 09:53:43 -07:00
LineEditor
Linker Revert rG5dd566b7c7b78bd- "PassManager.h - remove unnecessary Function.h/Module.h includes. NFCI." 2020-07-24 13:02:33 +01:00
MC [AIX][XCOFF] change the operand of branch instruction from symbol name to qualified symbol name for function declarations 2020-08-11 15:26:19 -04:00
MCA [MCA][InstrBuilder] Correctly mark reserved resources in initializeUsedResources. 2020-05-10 19:25:54 +01:00
Object [llvm-libtool-darwin] Refactor ArchiveWriter 2020-08-13 10:56:30 -07:00
ObjectYAML [DWARFYAML] Replace InitialLength with Format and Length. NFC. 2020-08-13 18:39:03 +08:00
Option [Clang options] Optimize optionMatches() runtime by removing mallocs 2020-08-12 23:07:07 -07:00
Passes [NewPM] Print 'Skipping pass' as pass instrumentation 2020-08-07 15:02:02 -07:00
ProfileData [llvm-cov] reset executation count to 0 after wrapped segment 2020-08-04 18:38:44 -07:00
Remarks BitstreamRemarkParser.h - remove unnecessary includes. NFCI. 2020-08-06 13:17:53 +01:00
Support [SystemZ/ZOS] Implement computeHostNumPhysicalCores 2020-08-12 08:31:33 -04:00
TableGen [TableGen][CGS] Print better errors on overlapping InstRW 2020-07-27 09:41:10 -06:00
Target Revert "[ARM] Fix IT block generation after Thumb2SizeReduce with -Oz" 2020-08-13 22:40:36 +01:00
Testing [cmake] Make gtest macro definitions a part the library interface 2020-08-11 15:22:44 +02:00
TextAPI [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
ToolDrivers [llvm-lib] Support adding short import library objects with llvm-lib 2020-07-24 22:15:08 +03:00
Transforms hwasan: Emit the globals note even when globals are uninstrumented. 2020-08-13 16:33:22 -07:00
WindowsManifest
XRay [xray] Add llvm-xray extract support for 32 bit ARM 2020-05-28 18:41:11 -04:00
CMakeLists.txt [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00
LLVMBuild.txt [elfabi] Move llvm-elfabi related code to InterfaceStub library 2020-08-13 11:51:44 -07:00