| Index: third_party/afl/src/afl-showmap.c
|
| diff --git a/third_party/afl/src/afl-showmap.c b/third_party/afl/src/afl-showmap.c
|
| index cd66772e1245afa16d6551893aab0ba65fe05987..bb96002e12dd4ba2c5bd50557d42258289aa5f30 100644
|
| --- a/third_party/afl/src/afl-showmap.c
|
| +++ b/third_party/afl/src/afl-showmap.c
|
| @@ -73,21 +73,17 @@ static volatile u8
|
| /* Classify tuple counts. Instead of mapping to individual bits, as in
|
| afl-fuzz.c, we map to more user-friendly numbers between 1 and 8. */
|
|
|
| -#define AREP4(_sym) (_sym), (_sym), (_sym), (_sym)
|
| -#define AREP8(_sym) AREP4(_sym), AREP4(_sym)
|
| -#define AREP16(_sym) AREP8(_sym), AREP8(_sym)
|
| -#define AREP32(_sym) AREP16(_sym), AREP16(_sym)
|
| -#define AREP64(_sym) AREP32(_sym), AREP32(_sym)
|
| -#define AREP128(_sym) AREP64(_sym), AREP64(_sym)
|
| -
|
| -static u8 count_class_lookup[256] = {
|
| -
|
| - /* 0 - 3: 4 */ 0, 1, 2, 3,
|
| - /* 4 - 7: +4 */ AREP4(4),
|
| - /* 8 - 15: +8 */ AREP8(5),
|
| - /* 16 - 31: +16 */ AREP16(6),
|
| - /* 32 - 127: +96 */ AREP64(7), AREP32(7),
|
| - /* 128+: +128 */ AREP128(8)
|
| +static const u8 count_class_lookup[256] = {
|
| +
|
| + [0] = 0,
|
| + [1] = 1,
|
| + [2] = 2,
|
| + [3] = 3,
|
| + [4 ... 7] = 4,
|
| + [8 ... 15] = 5,
|
| + [16 ... 31] = 6,
|
| + [32 ... 127] = 7,
|
| + [128 ... 255] = 8
|
|
|
| };
|
|
|
| @@ -346,8 +342,10 @@ static void set_up_environment(void) {
|
| "allocator_may_return_null=1:"
|
| "msan_track_origins=0", 0);
|
|
|
| - if (getenv("AFL_LD_PRELOAD"))
|
| - setenv("LD_PRELOAD", getenv("AFL_LD_PRELOAD"), 1);
|
| + if (getenv("AFL_PRELOAD")) {
|
| + setenv("LD_PRELOAD", getenv("AFL_PRELOAD"), 1);
|
| + setenv("DYLD_INSERT_LIBRARIES", getenv("AFL_PRELOAD"), 1);
|
| + }
|
|
|
| }
|
|
|
|
|