1*2946cd70SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 2*2946cd70SChandler Carruth // See https://llvm.org/LICENSE.txt for license information. 3*2946cd70SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 428fe54faSKostya Serebryany 528fe54faSKostya Serebryany // When tracing data flow, explode the number of DFSan labels. 628fe54faSKostya Serebryany #include <cstddef> 728fe54faSKostya Serebryany #include <cstdint> 828fe54faSKostya Serebryany 928fe54faSKostya Serebryany static volatile int sink; 1028fe54faSKostya Serebryany 1128fe54faSKostya Serebryany __attribute__((noinline)) 1228fe54faSKostya Serebryany void f(uint8_t a, uint8_t b, uint8_t c, uint8_t d) { 1328fe54faSKostya Serebryany if (a == b + 1 && c == d + 2) 1428fe54faSKostya Serebryany sink++; 1528fe54faSKostya Serebryany } 1628fe54faSKostya Serebryany 1728fe54faSKostya Serebryany extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) { 1828fe54faSKostya Serebryany for (size_t a = 0; a < Size; a++) 1928fe54faSKostya Serebryany for (size_t b = 0; b < Size; b++) 2028fe54faSKostya Serebryany for (size_t c = 0; c < Size; c++) 2128fe54faSKostya Serebryany for (size_t d = 0; d < Size; d++) 2228fe54faSKostya Serebryany f(Data[a], Data[b], Data[c], Data[d]); 2328fe54faSKostya Serebryany return 0; 2428fe54faSKostya Serebryany } 25