Skip to content

Commit

Permalink
2.38b
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-huet committed Feb 6, 2017
1 parent 583fe7d commit aa63ca2
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion config.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/* Version string: */

#define VERSION "2.37b"
#define VERSION "2.38b"

/******************************************************
* *
Expand Down
7 changes: 7 additions & 0 deletions docs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@ Not sure if you should upgrade? The lowest currently recommended version
is 2.31b. If you're stuck on an earlier release, it's strongly advisable
to get on with the times.

--------------
Version 2.38b:
--------------

- Added -mllvm -sanitizer-coverage-block-threshold=0 to trace-pc-guard
mode, as suggested by Kostya Serebryany.

--------------
Version 2.37b:
--------------
Expand Down
2 changes: 2 additions & 0 deletions llvm_mode/afl-clang-fast.c
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,8 @@ static void edit_params(u32 argc, char** argv) {

#ifdef USE_TRACE_PC
cc_params[cc_par_cnt++] = "-fsanitize-coverage=trace-pc-guard";
cc_params[cc_par_cnt++] = "-mllvm";
cc_params[cc_par_cnt++] = "-sanitizer-coverage-block-threshold=0";
#else
cc_params[cc_par_cnt++] = "-Xclang";
cc_params[cc_par_cnt++] = "-load";
Expand Down
8 changes: 6 additions & 2 deletions llvm_mode/afl-llvm-rt.o.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
#include <sys/wait.h>
#include <sys/types.h>

/* This is a somewhat ugly hack for the experimental 'trace-pc-guard' mode.
Basically, we need to make sure that the forkserver is initialized after
the LLVM-generated runtime initialization pass, not before. */

#ifdef USE_TRACE_PC
# define CONST_PRIO 5
#else
Expand Down Expand Up @@ -260,14 +264,14 @@ __attribute__((constructor(CONST_PRIO))) void __afl_auto_init(void) {
The first function (__sanitizer_cov_trace_pc_guard) is called back on every
edge (as opposed to every basic block). */


void __sanitizer_cov_trace_pc_guard(uint32_t* guard) {
__afl_area_ptr[*guard]++;
}


/* Init callback. Populates instrumentation IDs. Note that we're using
ID of 0 as a special value to indicate non-instrumented bits. */
ID of 0 as a special value to indicate non-instrumented bits. That may
still touch the bitmap, but in a fairly harmless way. */

void __sanitizer_cov_trace_pc_guard_init(uint32_t* start, uint32_t* stop) {

Expand Down

0 comments on commit aa63ca2

Please sign in to comment.