-
Notifications
You must be signed in to change notification settings - Fork 208
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
Pass the -DSANITIZE=<type> cmake option to libaom #2070
Conversation
This is the official way to build libaom with sanitizer support: https://aomedia.googlesource.com/aom/+/master/README.md#sanitizers
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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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:
libavif/tests/oss-fuzz/build.sh
Line 52 in f8ad918
sed -i 's/meson setup \(.*\) \.\./meson setup \1 '"${DAV1D_EXTRA_FLAGS}"' ../g' ./ext/dav1d.cmd |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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:
libavif/tests/oss-fuzz/build.sh
Line 52 in f8ad918
sed -i 's/meson setup \(.*\) \.\./meson setup \1 '"${DAV1D_EXTRA_FLAGS}"' ../g' ./ext/dav1d.cmd |
This is the official way to build libaom with sanitizer support: https://aomedia.googlesource.com/aom/+/master/README.md#sanitizers