Skip to content

Commit 55c8e0b

Browse files
authored
Merge pull request #100 from stormshield-guillaumed/name-collision
Rename run to __libfuzzer_sys_run
2 parents 396dc4c + 9d61037 commit 55c8e0b

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/lib.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ macro_rules! fuzz_target {
221221
return 0;
222222
}
223223

224-
run(bytes);
224+
__libfuzzer_sys_run(bytes);
225225
0
226226
}
227227

@@ -234,11 +234,11 @@ macro_rules! fuzz_target {
234234
// panics in separate fuzzers can accidentally appear the same
235235
// because each fuzzer will have a function called
236236
// `rust_fuzzer_test_input`. By using a normal Rust function here
237-
// it's named something like `the_fuzzer_name::_::run` which should
237+
// it's named something like `the_fuzzer_name::_::__libfuzzer_sys_run` which should
238238
// ideally help prevent oss-fuzz from deduplicate fuzz bugs across
239239
// distinct targets accidentally.
240240
#[inline(never)]
241-
fn run($bytes: &[u8]) {
241+
fn __libfuzzer_sys_run($bytes: &[u8]) {
242242
$body
243243
}
244244
};
@@ -294,13 +294,13 @@ macro_rules! fuzz_target {
294294
Err(_) => return -1,
295295
};
296296

297-
let result = ::libfuzzer_sys::Corpus::from(run(data));
297+
let result = ::libfuzzer_sys::Corpus::from(__libfuzzer_sys_run(data));
298298
result.to_libfuzzer_code()
299299
}
300300

301301
// See above for why this is split to a separate function.
302302
#[inline(never)]
303-
fn run($data: $dty) -> $rty {
303+
fn __libfuzzer_sys_run($data: $dty) -> $rty {
304304
$body
305305
}
306306
};

0 commit comments

Comments
 (0)