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

Pass the -DSANITIZE=<type> cmake option to libaom #2070

Merged

Conversation

wantehchang
Copy link
Collaborator

This is the official way to build libaom with sanitizer support: https://aomedia.googlesource.com/aom/+/master/README.md#sanitizers

@wantehchang wantehchang requested review from y-guyon and vrabaud March 20, 2024 00:13
CXXFLAGS: -fsanitize=${{ matrix.sanitizer }}
LDFLAGS: -fsanitize=${{ matrix.sanitizer }}
run: >
sed -i -e 's/cmake -G Ninja \(.*\) \.\./cmake -G Ninja \1 -DSANITIZE=${{ matrix.sanitizer }} ../g' aom.cmd
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This line is based on line 52 below:

          sed -i -e 's/meson setup \(.*\) \.\./meson setup \1 '"-Db_sanitize=${{ matrix.sanitizer }} -Db_lundef=false"' ../g' dav1d.cmd

Note that I removed the double quotes and single quotes in the middle of the sed script. They do not seem necessary for this line. Are they necessary for line 45?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Are they necessary for line 45?

No idea, probably not. I took that from:

sed -i 's/meson setup \(.*\) \.\./meson setup \1 '"${DAV1D_EXTRA_FLAGS}"' ../g' ./ext/dav1d.cmd

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the info. I will try to remove or simplify the quotes in a separate pull request.

CXXFLAGS: -fsanitize=${{ matrix.sanitizer }}
LDFLAGS: -fsanitize=${{ matrix.sanitizer }}
run: >
sed -i -e 's/cmake -G Ninja \(.*\) \.\./cmake -G Ninja \1 -DSANITIZE=${{ matrix.sanitizer }} ../g' aom.cmd
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are they necessary for line 45?

No idea, probably not. I took that from:

sed -i 's/meson setup \(.*\) \.\./meson setup \1 '"${DAV1D_EXTRA_FLAGS}"' ../g' ./ext/dav1d.cmd

@wantehchang wantehchang merged commit edd02ee into AOMediaCodec:main Mar 20, 2024
21 checks passed
@wantehchang wantehchang deleted the pass-sanitize-cmake-opton-to-aom branch March 20, 2024 17:06
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