diff options
| author | van Hauser <vh@thc.org> | 2021-02-26 09:45:43 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-02-26 09:45:43 +0100 |
| commit | 78d96c4dc86ac20e2a6e244017407ccc037ff13b (patch) | |
| tree | e277f092c27714f75e0c19f9ac8ab18dbfd1745a /src/afl-cc.c | |
| parent | 7ae7b0f3732cfd9d82cf9403818012d00faa07c3 (diff) | |
| parent | ee0ca07f3c9f7c5971440f5dca70a2ee6f37584d (diff) | |
| download | afl++-78d96c4dc86ac20e2a6e244017407ccc037ff13b.tar.gz | |
Merge pull request #759 from AFLplusplus/dev
push to stable
Diffstat (limited to 'src/afl-cc.c')
| -rw-r--r-- | src/afl-cc.c | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/src/afl-cc.c b/src/afl-cc.c index d41f79a2..c3910e6d 100644 --- a/src/afl-cc.c +++ b/src/afl-cc.c @@ -1421,6 +1421,14 @@ int main(int argc, char **argv, char **envp) { } + if (instrument_opt_mode && instrument_mode == INSTRUMENT_DEFAULT && + (compiler_mode == LLVM || compiler_mode == UNSET)) { + + instrument_mode = INSTRUMENT_CLASSIC; + compiler_mode = LLVM; + + } + if (!compiler_mode) { // lto is not a default because outside of afl-cc RANLIB and AR have to @@ -1699,7 +1707,10 @@ int main(int argc, char **argv, char **envp) { "Do not be overwhelmed :) afl-cc uses good defaults if no options are " "selected.\n" "Read the documentation for FEATURES though, all are good but few are " - "defaults.\n\n"); + "defaults.\n" + "Recommended is afl-clang-lto with AFL_LLVM_CMPLOG or afl-clang-fast " + "with\n" + "AFL_LLVM_CMPLOG and AFL_LLVM_DICT2FILE.\n\n"); exit(1); @@ -1791,8 +1802,8 @@ int main(int argc, char **argv, char **envp) { if (instrument_opt_mode && instrument_mode != INSTRUMENT_CLASSIC && instrument_mode != INSTRUMENT_CFG) FATAL( - "CTX and NGRAM instrumentation options can only be used with CFG " - "(recommended) and CLASSIC instrumentation modes!"); + "CTX and NGRAM instrumentation options can only be used with LLVM and " + "CFG or CLASSIC instrumentation modes!"); if (getenv("AFL_LLVM_SKIP_NEVERZERO") && getenv("AFL_LLVM_NOT_ZERO")) FATAL( |
