Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compatibility mode broken with oss-fuzz #1125

Open
vrabaud opened this issue Apr 9, 2024 · 5 comments
Open

Compatibility mode broken with oss-fuzz #1125

vrabaud opened this issue Apr 9, 2024 · 5 comments

Comments

@vrabaud
Copy link
Contributor

vrabaud commented Apr 9, 2024

Two recent commits prevent us from upgrading fuzztest as our dependency for our fuzztest tests built on oss-fuzz as they break the check_build python3 infra/helper.py check_build --sanitizer address libavif.

The first one is: c217c31 . The change in

if (IsEnginePlaceholderInput(data)) return;
gets it to fail and we have to modify it to if (data.size() == 0) return;. I am not sure on whether it makes sense though.

The second one is 0c80b31 but it is not because of the bumped dependencies, it is because of set(GTEST_HAS_ABSL ON) which forces gtest to use absl flags and apparently has a different parsing. Before that, we could send flags to libfuzzer (deprecated but used on oss-fuzz) the following way: ./test --fuzz=MyTest -- -seed=0 -timeout=10 (here https://github.com/AOMediaCodec/libavif/blob/d074bae4b0b1d7423d102f6d9d5e0c5303971a51/tests/oss-fuzz/build.sh#L123) as officially done upstream at https://github.com/google/oss-fuzz/blob/50c8bb586c0835e6fda39e7e933be197750cdf03/infra/base-images/base-builder/compile_fuzztests.sh#L77

@Alami-Amine
Copy link

@vrabaud is this still an issue? Asking because I am planning to run FuzzTest with Compatiblity mode on OSS-Fuzz soon.

@vrabaud
Copy link
Contributor Author

vrabaud commented Jan 16, 2025

Yes it is still an issue.

This is what I have to patch fuzztest to get it to work on oss-fuzz: https://github.com/AOMediaCodec/libavif/blob/main/ext/fuzztest.cmd
(not there are more patches than the bug here, cf the )

And this is how we get fuzztest to work on oss-fuzz: https://github.com/AOMediaCodec/libavif/blob/49729e47142e6c6fa3541bd08abaf454939d8d6f/tests/oss-fuzz/build.sh#L87

@Alami-Amine
Copy link

Thanks a lot!

@vrabaud
Copy link
Contributor Author

vrabaud commented Jan 16, 2025

Are you planning on having a less convoluted way (Creation of a temporary script) ? And full CMake support ? Maybe I can help

@Alami-Amine
Copy link

Oh my case is a bit more complicated, I am integrating Google FuzzTest through Pigweed, and our Repo uses GN build system.

Pigweed is still not supporting the integration of FuzzTest and OSS-Fuzz through GN Build System. So for Now I am still blocked on that, Just trying Compatibility Mode to make sure it supports all FuzzTest APIs that I am using. (I can see that .WithSeeds() works in compatibility mode which is a relief)

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

No branches or pull requests

2 participants