diff options
Diffstat (limited to 'src/fuzz')
-rw-r--r-- | src/fuzz/fuzz.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/fuzz/fuzz.h b/src/fuzz/fuzz.h index 04c438edaf..a7d3a89fe2 100644 --- a/src/fuzz/fuzz.h +++ b/src/fuzz/fuzz.h @@ -27,3 +27,6 @@ static inline bool outside_size_range(size_t size, size_t lower, size_t upper) { return FUZZ_USE_SIZE_LIMIT; return false; } + +/* Force value to not be optimized away. */ +#define DO_NOT_OPTIMIZE(value) ({ asm volatile("" : : "g"(value) : "memory"); }) |