This change is an attempt to address the behavior found at
google/oss-fuzz#8389 where two distinct bugs were accidentally
deduplicated into the same bug report. One of the reasons for this is
that the stack traces between the two bugs were almost the same with
only very minor differences. My hope is that by forcing a unique stack
frame per fuzzer this will be less likely since there is guaranteed to
be at least one stack frame per fuzz target which is unique with this
change.
While I was here I wrapped up the generated function by the
fuzz_target! macro in a const _: () = { ... } to avoid adding this
new run function in to the normal module's namespace and accidentally
causing name collisions (e.g. if fuzz targets already have functions
named run)
This change is an attempt to address the behavior found at google/oss-fuzz#8389 where two distinct bugs were accidentally deduplicated into the same bug report. One of the reasons for this is that the stack traces between the two bugs were almost the same with only very minor differences. My hope is that by forcing a unique stack frame per fuzzer this will be less likely since there is guaranteed to be at least one stack frame per fuzz target which is unique with this change.
While I was here I wrapped up the generated function by the
fuzz_target!
macro in aconst _: () = { ... }
to avoid adding this newrun
function in to the normal module's namespace and accidentally causing name collisions (e.g. if fuzz targets already have functions namedrun
)