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

[CMake] sanitizer is forced to "address sanitizer" #1124

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

[CMake] sanitizer is forced to "address sanitizer" #1124

vrabaud opened this issue Apr 9, 2024 · 0 comments

Comments

@vrabaud
Copy link
Contributor

vrabaud commented Apr 9, 2024

In fuzzing mode or compatibility mode, address sanitizer is forced.

SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -DFUZZING_BUILD_MODE_UNSAFE_FOR_PRODUCTION -UNDEBUG -fsanitize=address")

This is problematic on oss-fuzz which has different sanitizers. We therefore remove those flags https://github.com/AOMediaCodec/libavif/blob/d074bae4b0b1d7423d102f6d9d5e0c5303971a51/ext/fuzztest.cmd#L14 and use the ones set in the environment variable CXXFLAGS by oss-fuzz.

I believe those sanitizer flags should only be set for FUZZTEST_FUZZING_MODE, not when FUZZTEST_COMPATIBILITY_MODE STREQUAL "libfuzzer").

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

1 participant