-
Notifications
You must be signed in to change notification settings - Fork 6
Closed
Labels
Description
Project
cortex
Description
src/bench/external_agent.rs lines 405 and 513 use state.container_ip.clone().unwrap() which will panic if container_ip is None.
Should use .ok_or_else() to return a proper error instead of crashing.
Error Message
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src/bench/external_agent.rs:405:42Debug Logs
N/A - issue is visible in source codeSystem Information
term-challenge commit: bdb9b05 (latest main)
Rust: stable
OS: Linux 6.8.0-90-generic (Ubuntu 24.04.3 LTS)Screenshots
N/A - issue is visible in source code
Steps to Reproduce
- Open src/bench/external_agent.rs
- Go to line 405
- See: state.container_ip.clone().unwrap()
- Same at line 513
Expected Behavior
Use .ok_or_else() to return graceful error if container_ip is None.
Actual Behavior
unwrap() panics and crashes the harness if container_ip is None.
Additional Context
container_id is properly handled with if let Some(ref id) but container_ip uses raw unwrap().
Reactions are currently unavailable