Skip to content

Commit adc140e

Browse files
committed
1.94b
1 parent f27c5c0 commit adc140e

File tree

7 files changed

+29
-10
lines changed

7 files changed

+29
-10
lines changed

Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#
1515

1616
PROGNAME = afl
17-
VERSION = 1.93b
17+
VERSION = 1.94b
1818

1919
PREFIX ?= /usr/local
2020
BIN_PATH = $(PREFIX)/bin

afl-as.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,12 @@ static void edit_params(int argc, char** argv) {
117117

118118
#endif /* __APPLE__ */
119119

120+
/* Although this is not documented, GCC also uses TEMP and TMP when TMPDIR
121+
is not set. We need to check these non-standard variables to properly
122+
handle the pass_thru logic later on. */
123+
124+
if (!tmp_dir) tmp_dir = getenv("TEMP");
125+
if (!tmp_dir) tmp_dir = getenv("TMP");
120126
if (!tmp_dir) tmp_dir = "/tmp";
121127

122128
as_params = ck_alloc((argc + 32) * sizeof(u8*));
@@ -444,7 +450,8 @@ static void add_instrumentation(void) {
444450

445451
if (!be_quiet) {
446452

447-
if (!ins_lines) WARNF("No instrumentation targets found.");
453+
if (!ins_lines) WARNF("No instrumentation targets found%s.",
454+
pass_thru ? " (pass-thru mode)" : "");
448455
else OKF("Instrumented %u locations (%s-bit, %s mode, ratio %u%%).",
449456
ins_lines, use_64bit ? "64" : "32",
450457
getenv("AFL_HARDEN") ? "hardened" : "non-hardened",

afl-cmin

+2-2
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@
1818
# the starting corpus. This has two uses:
1919
#
2020
# - Screening large corpora of input files before using them as a seed for
21-
# seed for afl-fuzz. The tool will remove functionally redundant files and
22-
# likely leave you with a much smaller set.
21+
# afl-fuzz. The tool will remove functionally redundant files and likely
22+
# leave you with a much smaller set.
2323
#
2424
# (In this case, you probably also want to consider running afl-tmin on
2525
# the individual files later on to reduce their size.)

alloc-inl.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,17 @@
5757

5858
/* Magic tokens used to mark used / freed chunks. */
5959

60-
#define ALLOC_MAGIC_C1 0xFF00
61-
#define ALLOC_MAGIC_F 0xFE00
62-
#define ALLOC_MAGIC_C2 0xF0
60+
#define ALLOC_MAGIC_C1 0xFF00FF00 /* Used head (dword) */
61+
#define ALLOC_MAGIC_F 0xFE00FE00 /* Freed head (dword) */
62+
#define ALLOC_MAGIC_C2 0xF0 /* Used tail (byte) */
6363

6464
/* Positions of guard tokens in relation to the user-visible pointer. */
6565

66-
#define ALLOC_C1(_ptr) (((u16*)(_ptr))[-3])
66+
#define ALLOC_C1(_ptr) (((u32*)(_ptr))[-2])
6767
#define ALLOC_S(_ptr) (((u32*)(_ptr))[-1])
6868
#define ALLOC_C2(_ptr) (((u8*)(_ptr))[ALLOC_S(_ptr)])
6969

70-
#define ALLOC_OFF_HEAD 6
70+
#define ALLOC_OFF_HEAD 8
7171
#define ALLOC_OFF_TOTAL (ALLOC_OFF_HEAD + 1)
7272

7373
/* Allocator increments for ck_realloc_block(). */

docs/ChangeLog

+12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,18 @@ Not sure if you should upgrade? The lowest currently recommended version
1616
is 1.92b. If you're stuck on an earlier release, it's strongly advisable
1717
to get on with the times.
1818

19+
--------------
20+
Version 1.94b:
21+
--------------
22+
23+
- Changed allocator alignment to improve support for non-x86 systems (now
24+
that llvm_mode makes this more feasible).
25+
26+
- Fixed a minor typo in afl-cmin. Spotted by Jonathan Neuschafer.
27+
28+
- Fixed an obscure bug that would affect people trying to use afl-gcc
29+
with $TMP set but $TMPDIR absent. Spotted by Jeremy Barnes.
30+
1931
--------------
2032
Version 1.93b:
2133
--------------

docs/README

+1
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,7 @@ bug reports, or patches from:
424424
rc0r Jonathan Foote
425425
Christian Holler Dominique Pelle
426426
Jacek Wielemborek Leo Barnes
427+
Jeremy Barnes
427428

428429
Thank you!
429430

llvm_mode/afl-clang-fast.c

-1
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ static void edit_params(u32 argc, char** argv) {
216216
#else
217217
"void _I(void) __asm__(\"__afl_manual_init\"); "
218218
#endif /* ^__APPLE__ */
219-
220219
"_I(); } while (0)";
221220

222221
if (maybe_linking) {

0 commit comments

Comments
 (0)