1 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
2 // See https://llvm.org/LICENSE.txt for license information.
3 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 // A fuzz target with lots of edges.
9 static inline void break_optimization(const void *arg
) {
10 __asm__
__volatile__("" : : "r" (arg
) : "memory");
17 if (Data[(i + __LINE__) % Size] == (c % 256)) \
18 break_optimization(Data); \
20 break_optimization(0); \
23 // for (int i = 0, n = Data[(__LINE__ - 1) % Size] % 16; i < n; i++)
25 #define B do{A; A; A; A; A; A; A; A; A; A; A; A; A; A; A; A; A; A; }while(0)
26 #define C do{B; B; B; B; B; B; B; B; B; B; B; B; B; B; B; B; B; B; }while(0)
27 #define D do{C; C; C; C; C; C; C; C; C; }while(0)
30 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
) {