compile_native_go_fuzzer_v2: fix handling of multiple file matches#14783
Conversation
e8ad8a1 to
c2219f0
Compare
|
cc @jonathanmetzman do yo think we can move this further? Thanks |
|
/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers address coverage |
|
I do not have access to failure logs so I don't know if they are related to this change. |
|
cc @AdamKorcz Do you think we can move this further? |
|
/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers address coverage |
The script uses recursive grep to find fuzzer functions, which can match function names in multiple files. This causes fuzzer_filename to contain multiple files, breaking the convertLibFuzzerTestcaseToStdLibGo command during coverage builds. Fix by searching directly for the function signature with testing.F parameter, which only exists in the actual fuzzer test file. This avoids false matches in files that only reference the function name in comments or helper functions. The script now also explicitly fails if multiple matching files are found. Required for google#14183 Signed-off-by: Julien Pivotto <291750+roidelapluie@users.noreply.github.com>
cf688d4 to
e5c52fd
Compare
|
@AdamKorcz I did fix an issue, can you re-run the tests? Thanks! |
|
/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers address coverage |
|
@AdamKorcz unfortunately the build failed with unrelated reasons. this is now on top of master again. |
|
@roidelapluie thank you for rebasing. if the trial-build fails for unrelated reasons, that is fine, we can still merge it. If I verify that the failures are unrelated, we are good to go. We will need to run it again, and if it fails, could you hold off any updates and rebases until I review the logs? |
|
@AdamKorcz Yes, will do |
|
/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers address coverage |
|
@AdamKorcz Can you please have a look ? Seems there is just one timeout. |
AdamKorcz
left a comment
There was a problem hiding this comment.
Looks good. The failed builds in the cloud run are unrelated.
Thank you for the contribution and the patience.
The script uses recursive grep to find fuzzer functions, which can match function names in multiple files. This causes fuzzer_filename to contain multiple files, breaking the convertLibFuzzerTestcaseToStdLibGo command during coverage builds.
Fix by searching directly for the function signature with testing.F parameter, which only exists in the actual fuzzer test file. This avoids false matches in files that only reference the function name in comments or helper functions. The script now also explicitly fails if multiple matching files are found.
Required for #14183