Fix the OOM exit code from 137 to 9 (#2029)

* i don't know if there really exit 137

* change message

* not 137 but 9
This commit is contained in:
Dongjia "toka" Zhang 2024-04-09 17:16:25 +02:00 committed by GitHub
parent 33c6ea1ae4
commit c4f076356f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1465,10 +1465,8 @@ where
log::error!("Failed to detach from broker: {err}"); log::error!("Failed to detach from broker: {err}");
} }
#[cfg(unix)] #[cfg(unix)]
if child_status == 137 { if child_status == 9 {
// Out of Memory, see https://tldp.org/LDP/abs/html/exitcodes.html panic!("Target received SIGKILL!. This could indicate the target crashed due to OOM, user sent SIGKILL, or the target was in an unrecoverable situation and could not save state to restart");
// and https://github.com/AFLplusplus/LibAFL/issues/32 for discussion.
panic!("Fuzzer-respawner: The fuzzed target crashed with an out of memory error! Fix your harness, or switch to another executor (for example, a forkserver).");
} }
// Storing state in the last round did not work // Storing state in the last round did not work
panic!("Fuzzer-respawner: Storing state in crashed fuzzer instance did not work, no point to spawn the next client! This can happen if the child calls `exit()`, in that case make sure it uses `abort()`, if it got killed unrecoverable (OOM), or if there is a bug in the fuzzer itself. (Child exited with: {child_status})"); panic!("Fuzzer-respawner: Storing state in crashed fuzzer instance did not work, no point to spawn the next client! This can happen if the child calls `exit()`, in that case make sure it uses `abort()`, if it got killed unrecoverable (OOM), or if there is a bug in the fuzzer itself. (Child exited with: {child_status})");