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

Support UBSan for local fuzzing #187

Merged
merged 1 commit into from
Dec 2, 2021
Merged

Conversation

fmeum
Copy link
Member

@fmeum fmeum commented Nov 28, 2021

With Jazzer supporting full UBSan as of CodeIntelligenceTesting/jazzer#169 as well as a much simpler way to link the UBSan C++ runtime via the flag used in #186, UBSan can now be supported in local mode without introducing additional complexity.

The list of enabled UBSan checks is taken from OSS-Fuzz.

The commit also adds tests to verify that both C++ and Java fuzz tests support the UBSan C++ checks without linker errors.

Copy link
Collaborator

@stefanbucur stefanbucur left a comment

Choose a reason for hiding this comment

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

Looks great overall, thanks for contributing! Some naming issues only.

examples/BUILD Outdated Show resolved Hide resolved
examples/java/com/example/NativeUbsanCcFuzzTest.cpp Outdated Show resolved Hide resolved
examples/ubsan_cc_fuzz_test.cc Outdated Show resolved Hide resolved
examples/ubsan_fuzz_test.cc Outdated Show resolved Hide resolved
@fmeum fmeum force-pushed the ubsan branch 2 times, most recently from 9d92f34 to 8d663cc Compare November 30, 2021 07:52
@fmeum
Copy link
Member Author

fmeum commented Nov 30, 2021

I addressed your changes and expanded some of the comments.

With Jazzer supporting full UBSan as of
CodeIntelligenceTesting/jazzer#169
as well as a much simpler way to link the UBSan C++ runtime via the flag
used in bazel-contrib#186, UBSan can now be supported in local mode without
introducing additional complexity.

The list of enabled UBSan checks is taken from OSS-Fuzz.

The commit also adds tests to verify that both C++ and Java fuzz tests
support the UBSan C++ checks without linker errors.
@stefanbucur stefanbucur merged commit facdeb5 into bazel-contrib:master Dec 2, 2021
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