llvm-project/llvm/test/Instrumentation/DataFlowSanitizer
George Balatsouras a45fd436ae [dfsan] Fix origin tracking for fast8
The problem is the following. With fast8, we broke an important
invariant when loading shadows.  A wide shadow of 64 bits used to
correspond to 4 application bytes with fast16; so, generating a single
load was okay since those 4 application bytes would share a single
origin.  Now, using fast8, a wide shadow of 64 bits corresponds to 8
application bytes that should be backed by 2 origins (but we kept
generating just one).

Let’s say our wide shadow is 64-bit and consists of the following:
0xABCDEFGH. To check if we need the second origin value, we could do
the following (on the 64-bit wide shadow) case:

 - bitwise shift the wide shadow left by 32 bits (yielding 0xEFGH0000)
 - push the result along with the first origin load to the shadow/origin vectors
 - load the second 32-bit origin of the 64-bit wide shadow
 - push the wide shadow along with the second origin to the shadow/origin vectors.

The combineOrigins would then select the second origin if the wide
shadow is of the form 0xABCDE0000.  The tests illustrate how this
change affects the generated bitcode.

Reviewed By: stephan.yichao.zhao

Differential Revision: https://reviews.llvm.org/D101584
2021-04-30 15:57:33 -07:00
..
Inputs
abilist.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
abilist_aggregate.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
args-unreachable-bb.ll [dfsan] Remove hard-coded shadow width in more tests 2021-03-03 15:05:16 -08:00
arith.ll [dfsan] Remove hard-coded shadow width in more tests 2021-03-03 15:05:16 -08:00
array.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
atomics.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
basic.ll [dfsan] Track origin at loads 2021-04-22 16:25:24 +00:00
call.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
callback.ll [dfsan] Remove hard-coded shadow width in more tests 2021-03-03 15:05:16 -08:00
custom_fun_callback_attributes.ll [dfsan] Increase coverage of vector and select tests 2021-03-04 12:56:55 -08:00
custom_fun_varargs_attributes.ll [dfsan] Increase coverage of vector and select tests 2021-03-04 12:56:55 -08:00
debug-nonzero-labels.ll [dfsan] Remove hard-coded shadow width in more tests 2021-03-03 15:05:16 -08:00
debug.ll
external_mask.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
fast16labels.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
load.ll [dfsan] Support passing non-i16 shadow values in TLS mode 2020-12-04 02:45:07 +00:00
memset.ll [dfsan] Remove hard-coded shadow width in more tests 2021-03-03 15:05:16 -08:00
origin_abilist.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_cached_shadows.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_call.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_load.ll [dfsan] Fix origin tracking for fast8 2021-04-30 15:57:33 -07:00
origin_mem_intrinsic.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_other_ops.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_phi.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_select.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_store.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_store_threshold.ll [dfsan] Enable origin tracking with fast8 mode 2021-04-20 18:10:32 -07:00
origin_track_load.ll [dfsan] Track origin at loads 2021-04-22 16:25:24 +00:00
phi.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
prefix-rename.ll
select.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
shadow-args-zext.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
store.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
struct.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00
uninstrumented_local_functions.ll [dfsan] Increase coverage of vector and select tests 2021-03-04 12:56:55 -08:00
union-large.ll
union.ll
unordered_atomic_mem_intrins.ll
vector.ll [dfsan] Add -dfsan-fast-8-labels flag 2021-03-18 16:28:42 -07:00