llvm-mirror/test/Instrumentation/MemorySanitizer
Alexander Potapenko 3544b0e869 [MSan] run materializeChecks() before materializeStores()
When pointer checking is enabled, it's important that every pointer is
checked before its value is used.
For stores MSan used to generate code that calculates shadow/origin
addresses from a pointer before checking it.
For userspace this isn't a problem, because the shadow calculation code
is quite simple and compiler is able to move it after the check on -O2.
But for KMSAN getShadowOriginPtr() creates a runtime call, so we want the
check to be performed strictly before that call.

Swapping materializeChecks() and materializeStores() resolves the issue:
both functions insert code before the given IR location, so the new
insertion order guarantees that the code calculating shadow address is
between the address check and the memory access.

llvm-svn: 337571
2018-07-20 16:28:49 +00:00
..
AArch64 Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
Mips Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
PowerPC Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
X86
alloca.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
array_types.ll
atomics.ll Use CHECK-LABEL in MSan IR tests. 2015-08-25 20:59:26 +00:00
byval-alignment.ll Remove alignment argument from memcpy/memmove/memset in favour of alignment attributes (Step 1) 2018-01-19 17:13:12 +00:00
check_access_address.ll [MSan] run materializeChecks() before materializeStores() 2018-07-20 16:28:49 +00:00
check-constant-shadow.ll
csr.ll [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
global_ctors_2to3.ll [msan] Don't put module constructors in comdats. 2016-03-15 20:25:47 +00:00
instrumentation-with-call-threshold.ll
manual-shadow.ll Add msan custom mapping options. 2018-03-29 21:18:17 +00:00
masked-store-load.ll [msan] Instrument masked.store, masked.load intrinsics. 2018-05-15 21:28:25 +00:00
missing_origin.ll Update some code.google.com links 2017-11-13 23:47:58 +00:00
msan_basic.ll [FileCheck] Add -allow-deprecated-dag-overlap to failing llvm tests 2018-07-11 20:25:49 +00:00
msan_x86_bts_asm.ll MSan: introduce the conservative assembly handling mode. 2018-04-03 09:50:06 +00:00
msan_x86intrinsics.ll [x86] Revert r330322 (& r330323): Lowering x86 adds/addus/subs/subus intrinsics 2018-04-26 21:46:01 +00:00
mul_by_constant.ll [msan] Fix crash on multiplication by a non-integer constant. 2015-10-14 00:21:13 +00:00
nosanitize.ll [msan] Don't sanitize "nosanitize" instructions 2017-11-20 23:37:56 +00:00
origin-alignment.ll [msan] Relax origin-alignment test. 2015-11-24 21:44:16 +00:00
origin-array.ll [sanitizer] [msan] Fix origin store of array types 2016-01-11 19:55:27 +00:00
pr32842.ll [msan] Fix PR32842 2017-05-11 11:07:48 +00:00
return_from_main.ll Use CHECK-LABEL in MSan IR tests. 2015-08-25 20:59:26 +00:00
store-long-origin.ll
store-origin.ll [DebugInfo] Add DILabel metadata and intrinsic llvm.dbg.label. 2018-05-09 02:40:45 +00:00
str-nobuiltin.ll [sanitizers] Disable target-specific lowering of string functions. 2016-06-18 10:10:37 +00:00
unreachable.ll Use CHECK-LABEL in MSan IR tests. 2015-08-25 20:59:26 +00:00
unsized_type.ll [msan] Only check shadow memory for operands that are sized. 2017-07-11 18:13:52 +00:00
vector_arith.ll [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
vector_cmp.ll [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
vector_cvt.ll [X86] Remove and autoupgrade cvtsi2ss/cvtsi2sd intrinsics to match what clang has used for a very long time. 2018-05-12 23:14:39 +00:00
vector_pack.ll [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
vector_shift.ll [X86] Replace 'REQUIRES: x86' in tests with 'REQUIRES: x86-registered-target' which seems to be the correct way to make them run on an x86 build. 2017-06-04 08:21:58 +00:00
with-call-type-size.ll [msan] Fix __msan_maybe_ for non-standard type sizes. 2016-07-01 22:49:59 +00:00