CodeIntelligenceTesting / jazzer

Coverage-guided, in-process fuzzing for the JVM
https://code-intelligence.com
Other
1.03k stars 137 forks source link

Separate Sanitizers for Android #783

Closed TheCoryBarker closed 1 year ago

TheCoryBarker commented 1 year ago

This is to create a separate list of Android sanitizers. These sanitizers will be packaged up with the rest of the sanitizers for a normal Jazzer build, and then the user can specify to use these sanitizers at instrumentation time with the flag --use_android_sanitizers. This flag will be used for Android for offline instrumentation, like so:

> ./jazzer --instrument_only=<fuzz_target>.jar --dump_classes_dir=/tmp --use_android_sanitizers

and then you'll have a jar file that is instrumented for Android. The Jazzer built for Android wont need all of the sanitizers, so only the Android sanitizers will be included in the Android build.

The reasons to keep these lists separate are:

TheCoryBarker commented 1 year ago

Could we instead get by with select on @platforms//os:android and, if necessary, a bool_flag?

We already have more runtime flags than we should, which makes testing more difficult.

I like this idea, I'll make this change