Skip to content

Conversation

@roidelapluie
Copy link
Contributor

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

@roidelapluie roidelapluie force-pushed the fix-compile-native-go-fuzzer-v2-multiple-matches branch from 7a222ca to e8ad8a1 Compare January 13, 2026 10:42
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>
@roidelapluie roidelapluie force-pushed the fix-compile-native-go-fuzzer-v2-multiple-matches branch from e8ad8a1 to c2219f0 Compare January 13, 2026 10:47
@roidelapluie
Copy link
Contributor Author

cc @jonathanmetzman do yo think we can move this further? Thanks

@AdamKorcz
Copy link
Collaborator

/gcbrun trial_build.py go --fuzzing-engines libfuzzer --sanitizers address coverage

@roidelapluie
Copy link
Contributor Author

I do not have access to failure logs so I don't know if they are related to this change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants