better warn if skipping large dict

This commit is contained in:
van Hauser 2020-10-29 10:45:32 +01:00
parent 7c8b0af84a
commit abac876b3a
2 changed files with 6 additions and 6 deletions

View File

@ -1251,7 +1251,7 @@ size_t SplitComparesTransform::splitIntCompares(Module &M, unsigned bitw) {
bool SplitComparesTransform::runOnModule(Module &M) { bool SplitComparesTransform::runOnModule(Module &M) {
int bitw = 64; int bitw = 64;
size_t count; size_t count = 0;
char *bitw_env = getenv("AFL_LLVM_LAF_SPLIT_COMPARES_BITW"); char *bitw_env = getenv("AFL_LLVM_LAF_SPLIT_COMPARES_BITW");
if (!bitw_env) bitw_env = getenv("LAF_SPLIT_COMPARES_BITW"); if (!bitw_env) bitw_env = getenv("LAF_SPLIT_COMPARES_BITW");
@ -1296,7 +1296,7 @@ bool SplitComparesTransform::runOnModule(Module &M) {
switch (bitw) { switch (bitw) {
case 64: case 64:
count = splitIntCompares(M, bitw); count += splitIntCompares(M, bitw);
/* /*
if (!be_quiet) if (!be_quiet)
errs() << "Split-integer-compare-pass " << bitw << "bit: " << errs() << "Split-integer-compare-pass " << bitw << "bit: " <<
@ -1309,7 +1309,7 @@ bool SplitComparesTransform::runOnModule(Module &M) {
[[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */ [[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */
#endif #endif
case 32: case 32:
count = splitIntCompares(M, bitw); count += splitIntCompares(M, bitw);
/* /*
if (!be_quiet) if (!be_quiet)
errs() << "Split-integer-compare-pass " << bitw << "bit: " << errs() << "Split-integer-compare-pass " << bitw << "bit: " <<
@ -1322,7 +1322,7 @@ bool SplitComparesTransform::runOnModule(Module &M) {
[[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */ [[clang::fallthrough]]; /*FALLTHRU*/ /* FALLTHROUGH */
#endif #endif
case 16: case 16:
count = splitIntCompares(M, bitw); count += splitIntCompares(M, bitw);
/* /*
if (!be_quiet) if (!be_quiet)
errs() << "Split-integer-compare-pass " << bitw << "bit: " << errs() << "Split-integer-compare-pass " << bitw << "bit: " <<

View File

@ -451,8 +451,8 @@ void add_extra(afl_state_t *afl, u8 *mem, u32 len) {
if (len > MAX_DICT_FILE) { if (len > MAX_DICT_FILE) {
WARNF("Extra '%.*s' is too big (%s, limit is %s)", (int)len, mem, WARNF("Extra '%.*s' is too big (%s, limit is %s), skipping file!", (int)len,
stringify_mem_size(val_bufs[0], sizeof(val_bufs[0]), len), mem, stringify_mem_size(val_bufs[0], sizeof(val_bufs[0]), len),
stringify_mem_size(val_bufs[1], sizeof(val_bufs[1]), MAX_DICT_FILE)); stringify_mem_size(val_bufs[1], sizeof(val_bufs[1]), MAX_DICT_FILE));
return; return;