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

Export EXTRA_CMAKE_FLAGS to remove the "unbound variable" error #2041

Merged
merged 1 commit into from
Feb 26, 2024

Conversation

vrabaud
Copy link
Collaborator

@vrabaud vrabaud commented Feb 26, 2024

BUG=oss-fuzz:67018

@vrabaud vrabaud requested a review from y-guyon February 26, 2024 10:11
@@ -75,6 +75,8 @@ if [ "$FUZZING_ENGINE" == "libfuzzer" ]
then
export CXXFLAGS="${CXXFLAGS} -DFUZZTEST_COMPATIBILITY_MODE"
export EXTRA_CMAKE_FLAGS="-DAVIF_ENABLE_FUZZTEST=ON -DFUZZTEST_COMPATIBILITY_MODE=libfuzzer"
else
export EXTRA_CMAKE_FLAGS=""
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to revert CXXFLAGS?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nope, it is already given by the fuzzer (with all the -fsanitize ...)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think you need to export EXTRA_CMAKE_FLAGS; no subprocess depends on the value. You can just assign it to something.

If CXXFLAGS is already exported, assigning to it will update the exported value as well. Though it doesn't hurt to be explicit.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. EXTRA_CMAKE_FLAGS is only used at line 88 and just needs to be a regular shell variable rather than an environment variable.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in #2044

@vrabaud vrabaud merged commit e7ab3d4 into AOMediaCodec:main Feb 26, 2024
20 checks passed
@vrabaud vrabaud deleted the oss_fuzz branch February 26, 2024 10:49
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.

4 participants