Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

why choose 15k as MAX_INPUT_LEN? #52

Open
zjuchenyuan opened this issue May 18, 2019 · 1 comment
Open

why choose 15k as MAX_INPUT_LEN? #52

zjuchenyuan opened this issue May 18, 2019 · 1 comment

Comments

@zjuchenyuan
Copy link

zjuchenyuan commented May 18, 2019

In common/src/config.rs

pub const MAX_INPUT_LEN: usize = 15000;

This value is used to ignore those seed files larger than 15000 bytes.

pub fn sync_depot(executor: &mut Executor, running: Arc<AtomicBool>, dir: &Path) {
executor.local_stats.clear();
let seed_dir = dir.read_dir().expect("read_dir call failed");
for entry in seed_dir {
if let Ok(entry) = entry {
if !running.load(Ordering::SeqCst) {
break;
}
let path = &entry.path();
if path.is_file() {
let file_len =
fs::metadata(path).expect("Could not fetch metadata.").len() as usize;
if file_len < config::MAX_INPUT_LEN {
let buf = read_from_file(path);
executor.run_sync(&buf);
}
}
}
}
info!("sync {} file from seeds.", executor.local_stats.num_inputs);
executor.update_log();
}

From Line 26, only size less than 14.64kb is executed. Larger files are silently ignored, without print any warning message.

I think 14.64kb is a rather small size, why do you choose this value?

@spinpx
Copy link
Member

spinpx commented May 22, 2019

If the size of seed input is too large, Angora will take too much time in byte-level taint analysis.
We had added some warnnings now.
commit : 16cb612

I will improve this problem recently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants