diff options
author | hexcoder- <heiko@hexco.de> | 2020-09-01 19:54:18 +0200 |
---|---|---|
committer | hexcoder- <heiko@hexco.de> | 2020-09-01 19:54:18 +0200 |
commit | 6340674a23e9b8d2e8b3a8705be1129363a60d46 (patch) | |
tree | a65cc9c9069933317c2a0560e0d5525de5c8785f /llvm_mode/afl-clang-fast.c | |
parent | 4538f689ede6743d097c85ded2fdcb4f9663020b (diff) | |
parent | e4a86b40a5504c608d6ba7f44133ab39b24ac6f8 (diff) | |
download | afl++-6340674a23e9b8d2e8b3a8705be1129363a60d46.tar.gz |
Merge branch 'dev' of https://github.com/AFLplusplus/AFLplusplus into dev
Diffstat (limited to 'llvm_mode/afl-clang-fast.c')
-rw-r--r-- | llvm_mode/afl-clang-fast.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm_mode/afl-clang-fast.c b/llvm_mode/afl-clang-fast.c index 6ea98111..ccdbca9d 100644 --- a/llvm_mode/afl-clang-fast.c +++ b/llvm_mode/afl-clang-fast.c @@ -670,9 +670,11 @@ static void edit_params(u32 argc, char **argv, char **envp) { } + #ifndef __APPLE__ if (!shared_linking) cc_params[cc_par_cnt++] = alloc_printf("-Wl,--dynamic-list=%s/dynamic_list.txt", obj_path); + #endif #endif @@ -812,16 +814,24 @@ int main(int argc, char **argv, char **envp) { ptr += strlen("ngram"); while (*ptr && (*ptr < '0' || *ptr > '9')) { + ptr++; + } + if (!*ptr) { + ptr = getenv("AFL_LLVM_NGRAM_SIZE"); if (!ptr || !*ptr) { + FATAL( "you must set the NGRAM size with (e.g. for value 2) " "AFL_LLVM_INSTRUMENT=ngram-2"); + } + } + ngram_size = atoi(ptr); if (ngram_size < 2 || ngram_size > NGRAM_SIZE_MAX) FATAL( |