mirror of
https://github.com/AFLplusplus/AFLplusplus.git
synced 2025-06-15 19:38:09 +00:00
cleanup and rename _DISCARD->_SKIP
This commit is contained in:
@ -41,7 +41,7 @@ in any function where you want:
|
|||||||
* `__AFL_COVERAGE_ON();` - enable coverage from this point onwards
|
* `__AFL_COVERAGE_ON();` - enable coverage from this point onwards
|
||||||
* `__AFL_COVERAGE_OFF();` - disable coverage from this point onwards
|
* `__AFL_COVERAGE_OFF();` - disable coverage from this point onwards
|
||||||
* `__AFL_COVERAGE_DISCARD();` - reset all coverage gathered until this point
|
* `__AFL_COVERAGE_DISCARD();` - reset all coverage gathered until this point
|
||||||
* `__AFL_COVERAGE_ABORT();` - mark this test case as unimportant. Whatever happens, afl-fuzz will ignore it.
|
* `__AFL_COVERAGE_SKIP();` - mark this test case as unimportant. Whatever happens, afl-fuzz will ignore it.
|
||||||
|
|
||||||
## 3) Selective instrumenation with AFL_LLVM_ALLOWLIST/AFL_LLVM_DENYLIST
|
## 3) Selective instrumenation with AFL_LLVM_ALLOWLIST/AFL_LLVM_DENYLIST
|
||||||
|
|
||||||
|
@ -1429,7 +1429,7 @@ void __afl_coverage_discard() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// discard the testcase
|
// discard the testcase
|
||||||
void __afl_coverage_abort() {
|
void __afl_coverage_skip() {
|
||||||
|
|
||||||
__afl_coverage_discard();
|
__afl_coverage_discard();
|
||||||
|
|
||||||
|
@ -835,7 +835,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
"-D__AFL_COVERAGE()=int __afl_selective_coverage = 1;"
|
"-D__AFL_COVERAGE()=int __afl_selective_coverage = 1;"
|
||||||
"extern \"C\" void __afl_coverage_discard();"
|
"extern \"C\" void __afl_coverage_discard();"
|
||||||
"extern \"C\" void __afl_coverage_abort();"
|
"extern \"C\" void __afl_coverage_skip();"
|
||||||
"extern \"C\" void __afl_coverage_on();"
|
"extern \"C\" void __afl_coverage_on();"
|
||||||
"extern \"C\" void __afl_coverage_off();";
|
"extern \"C\" void __afl_coverage_off();";
|
||||||
|
|
||||||
@ -844,7 +844,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
"-D__AFL_COVERAGE()=int __afl_selective_coverage = 1;"
|
"-D__AFL_COVERAGE()=int __afl_selective_coverage = 1;"
|
||||||
"void __afl_coverage_discard();"
|
"void __afl_coverage_discard();"
|
||||||
"void __afl_coverage_abort();"
|
"void __afl_coverage_skip();"
|
||||||
"void __afl_coverage_on();"
|
"void __afl_coverage_on();"
|
||||||
"void __afl_coverage_off();";
|
"void __afl_coverage_off();";
|
||||||
|
|
||||||
@ -857,7 +857,7 @@ static void edit_params(u32 argc, char **argv, char **envp) {
|
|||||||
cc_params[cc_par_cnt++] = "-D__AFL_COVERAGE_OFF()=__afl_coverage_off()";
|
cc_params[cc_par_cnt++] = "-D__AFL_COVERAGE_OFF()=__afl_coverage_off()";
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
"-D__AFL_COVERAGE_DISCARD()=__afl_coverage_discard()";
|
"-D__AFL_COVERAGE_DISCARD()=__afl_coverage_discard()";
|
||||||
cc_params[cc_par_cnt++] = "-D__AFL_COVERAGE_ABORT()=__afl_coverage_abort()";
|
cc_params[cc_par_cnt++] = "-D__AFL_COVERAGE_SKIP()=__afl_coverage_skip()";
|
||||||
cc_params[cc_par_cnt++] =
|
cc_params[cc_par_cnt++] =
|
||||||
"-D__AFL_FUZZ_TESTCASE_BUF=(__afl_fuzz_ptr ? __afl_fuzz_ptr : "
|
"-D__AFL_FUZZ_TESTCASE_BUF=(__afl_fuzz_ptr ? __afl_fuzz_ptr : "
|
||||||
"__afl_fuzz_alt_ptr)";
|
"__afl_fuzz_alt_ptr)";
|
||||||
|
@ -703,7 +703,6 @@ save_if_interesting(afl_state_t *afl, void *mem, u32 len, u8 fault) {
|
|||||||
if (!classified) {
|
if (!classified) {
|
||||||
|
|
||||||
classify_counts(&afl->fsrv);
|
classify_counts(&afl->fsrv);
|
||||||
// classified = 1;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -337,7 +337,6 @@ int main(int argc, char **argv_orig, char **envp) {
|
|||||||
|
|
||||||
if (get_afl_env("AFL_DEBUG")) { debug = afl->debug = 1; }
|
if (get_afl_env("AFL_DEBUG")) { debug = afl->debug = 1; }
|
||||||
|
|
||||||
// map_size = get_map_size();
|
|
||||||
afl_state_init(afl, map_size);
|
afl_state_init(afl, map_size);
|
||||||
afl->debug = debug;
|
afl->debug = debug;
|
||||||
afl_fsrv_init(&afl->fsrv);
|
afl_fsrv_init(&afl->fsrv);
|
||||||
|
@ -253,7 +253,6 @@ static void edit_params(int argc, char **argv) {
|
|||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
|
|
||||||
s32 pid, i, status;
|
s32 pid, i, status;
|
||||||
// u8 * ptr;
|
|
||||||
char thecwd[PATH_MAX];
|
char thecwd[PATH_MAX];
|
||||||
|
|
||||||
if (getenv("AFL_LD_CALLER") != NULL) {
|
if (getenv("AFL_LD_CALLER") != NULL) {
|
||||||
|
Reference in New Issue
Block a user