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

Fuzzing session prevents application from exiting with exit() or sys.exit() #557

Open
678098 opened this issue Nov 19, 2021 · 2 comments
Open

Comments

@678098
Copy link
Contributor

678098 commented Nov 19, 2021

Fuzzing main loop handles all exceptions, but for SystemExit exception (that is being generated when exit() or sys.exit() is called) it just doesn't stop. So it's impossible to exit fuzzing application from another thread with exit() or sys.exit().

Workaround: brutally exit with os._exit() (it just doesn't raise SystemExit exception).

@678098 678098 changed the title Bug: fuzzing session prevents application from exiting with exit() or sys.exit() Fuzzing session prevents application from exiting with exit() or sys.exit() Nov 19, 2021
@SR4ven
Copy link
Collaborator

SR4ven commented Nov 23, 2021

Can you tell us where exactly the SystemExit exception is being caught?
I tried a raise SystemExit in _main_fuzz_loop but that exited the program just fine.

def _main_fuzz_loop(self, fuzz_case_iterator):

We catch Exception in some places, which I have to admit is not pretty, but doesn't catch BaseException which SystemExit or KeyboardInterrupt inherit from. I couldn't find any occurrences of base except: so SystemExit should work. https://docs.python.org/3/library/exceptions.html#Exception

@678098
Copy link
Contributor Author

678098 commented Sep 25, 2023

I will double check it soon

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