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 // Triggers the bug described here:
6 // https://github.com/google/oss-fuzz/issues/4605
8 // Tests that custom mutators do not cause MSan false positives. We are careful
9 // to use every parameter to ensure none cause false positives.
19 int LLVMFuzzerTestOneInput(const uint8_t *Data
, size_t Size
) { return 0; }
21 size_t LLVMFuzzerCustomMutator(uint8_t *Data
, size_t Size
, size_t MaxSize
,
27 for (size_t I
= 0; I
< Size
; ++I
) {
35 size_t LLVMFuzzerCustomCrossOver(
36 const uint8_t *Data1
, size_t Size1
, const uint8_t *Data2
, size_t Size2
,
37 uint8_t *Out
, size_t MaxOutSize
, unsigned int Seed
) {
41 for (; I
< Size1
&& I
< Size2
&& I
< MaxOutSize
; ++I
) {
42 Out
[I
] = std::min(Data1
[I
], Data2
[I
]);