Fuzzing session prevents application from exiting with `exit()` or `sys.exit()`
678098 opened this issue · comments
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).
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.
Line 1353 in 8384d46
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
I will double check it soon