`staterestore` saves to `temp_dir`, instead of local dir, and never cleans up
The staterestore feature currently writes the serialized state out to a <hash>.libafl_state file in the temp_dir.
There are two issues with this:
- The files are never cleaned up, resulting in fuzzers dying at a later stage when the
temp_diris full. - We store all other files in the local-directory, or in user-specified locations. Shouldn't we maintain this practice?
Ideally, the files should be written to the local dir, and cleaned up after they are read.
Wait... we do clean it up? https://github.com/AFLplusplus/LibAFL/blob/bb21ab7a63d8d5a2a7f99c6a6c39e4d2e87fb42b/libafl/src/bolts/staterestore.rs#L175
I have tons of files in my tempdir.... something is fishy...
Maybe leftovers from earlier runs? They won't get cleared on exit with a simple ctrl+c (hence, they are in a tmp dir)
Huh... why are they not cleared after read?
Closing this for now.