bug: Replace panic! with proper error handling in FFI runtime code #210
Labels
No labels
bug
dependencies
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
refactor
rust
technical-debt
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
navicore/patch-seq#210
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Runtime FFI functions use
panic!()for error conditions, which can crash the entire program instead of gracefully handling errors.Example from
crates/runtime/src/string_ops.rs(lines 27-55):Impact
Affected Files
crates/runtime/src/string_ops.rs- Multiple panic! callscrates/runtime/src/arithmetic.rs- Assert macroscrates/runtime/src/io.rs- Panic on I/O errorsextern "C"functionsProposed Solution
Option 1: Error return codes
Option 2: Thread-local error state
Option 3: Catch panics at FFI boundary
Acceptance Criteria
panic!()orassert!()inextern "C"functionsLabels
bug, runtime, high-priority
https://github.com/navicore/patch-seq/pull/223