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

[Question] Does fork mode executes LLVMFuzzerInitialize() each execution time? #1615

Open
illera88 opened this issue Feb 2, 2023 · 1 comment

Comments

@illera88
Copy link

illera88 commented Feb 2, 2023

Hi,

I have been reading the "fork mode" code and my understanding is that it will just call system() with some modifications from the original fuzzer arguments on as many threads as you indicate with -fork={threads}. But, maybe I'm missing something, but it looks like it does launch it from scratch each time and therefore calls LLVMFuzzerInitialize() which in my case is a very expensive function to call due to my target heavy initialization.
Am I right that LLVMFuzzerInitialize() is called per every execution?

I am in a situation in which I can't just return from a correct execution and:

  • Normal mode in libfuzzer doesn't allow me to exit()
  • Fork mode AFAIK does call LLVMFuzzerInitialize() on each thread on every execution.

Thank you for your help

@kcc
Copy link
Contributor

kcc commented Feb 7, 2023

I think you are correct, this is a per-process init and is called once per process.

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