Skip to content

Commit

Permalink
2.42b
Browse files Browse the repository at this point in the history
  • Loading branch information
thomas-huet committed Jun 18, 2017
1 parent a8aa47c commit 85db01c
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion afl-fuzz.c
Original file line number Diff line number Diff line change
Expand Up @@ -4412,7 +4412,7 @@ static void show_init_stats(void) {
limit is very expensive, so let's select a more conservative default. */

if (dumb_mode && !getenv("AFL_HANG_TMOUT"))
hang_tmout = exec_tmout * 4;
hang_tmout = MIN(EXEC_TIMEOUT, exec_tmout * 2 + 100);

OKF("All set and ready to roll!");

Expand Down
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.41b"
#define VERSION "2.42b"

/******************************************************
* *
Expand Down
9 changes: 8 additions & 1 deletion docs/ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,16 @@ Want to stay in the loop on major new features? Join our mailing list by
sending a mail to <[email protected]>.

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
is 2.41b. If you're stuck on an earlier release, it's strongly advisable
to get on with the times.

--------------
Version 2.42b:
--------------

- Renamed the R() macro to avoid a problem with llvm_mode in the latest
versions of LLVM. Fix suggested by Christian Holler.

--------------
Version 2.41b:
--------------
Expand Down
2 changes: 1 addition & 1 deletion docs/README
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ Every crash is also traceable to its parent non-crashing test case in the
queue, making it easier to diagnose faults.

Having said that, it's important to acknowledge that some fuzzing crashes can be
difficult quickly evaluate for exploitability without a lot of debugging and
difficult to quickly evaluate for exploitability without a lot of debugging and
code analysis work. To assist with this task, afl-fuzz supports a very unique
"crash exploration" mode enabled with the -C flag.

Expand Down
6 changes: 4 additions & 2 deletions llvm_mode/afl-llvm-pass.so.cc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
*/

#define AFL_LLVM_PASS

#include "../config.h"
#include "../debug.h"

Expand Down Expand Up @@ -112,11 +114,11 @@ bool AFLCoverage::runOnModule(Module &M) {
BasicBlock::iterator IP = BB.getFirstInsertionPt();
IRBuilder<> IRB(&(*IP));

if (R(100) >= inst_ratio) continue;
if (AFL_R(100) >= inst_ratio) continue;

/* Make up cur_loc */

unsigned int cur_loc = R(MAP_SIZE);
unsigned int cur_loc = AFL_R(MAP_SIZE);

ConstantInt *CurLoc = ConstantInt::get(Int32Ty, cur_loc);

Expand Down
6 changes: 5 additions & 1 deletion types.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,11 @@ typedef int64_t s64;
((_ret >> 8) & 0x0000FF00)); \
})

#define R(x) (random() % (x))
#ifdef AFL_LLVM_PASS
# define AFL_R(x) (random() % (x))
#else
# define R(x) (random() % (x))
#endif /* ^AFL_LLVM_PASS */

#define STRINGIFY_INTERNAL(x) #x
#define STRINGIFY(x) STRINGIFY_INTERNAL(x)
Expand Down

0 comments on commit 85db01c

Please sign in to comment.