Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/vm/src/stdlib/_signal.rs`:
- Around line 419-424: The change incorrectly reuses SIGNUM_RANGE to reject
signal 0 in strsignal(), causing ValueError for lookups that
host_signal::strsignal(signalnum) can legitimately handle (e.g., on Unix).
Remove or relax the SIGNUM_RANGE check from the strsignal function (the
#[pyfunction] fn strsignal(signalnum: i32, vm: &VirtualMachine) ->
PyResult<Option<String>>) so it does not reject 0 up front; instead, call
host_signal::strsignal(signalnum) directly and only error if that host call
indicates an invalid signal, keeping the existing ValueError behavior elsewhere
that uses SIGNUM_RANGE for delivery-only validation.
- Around line 482-485: The ValueError message created via vm.new_value_error
currently claims a closed interval "[1, {SIGNUM_RANGE.end}]" while SIGNUM_RANGE
is half-open; update the error text in the vm.new_value_error call so the upper
bound reflects the actual allowed value (e.g., use format!("signal number out of
range [1, {}]", SIGNUM_RANGE.end - 1) or state the half-open form like "[1,
{})") so the message matches SIGNUM_RANGE.contains() validation.