Return an error instead of aborting on panics in C API
Open
Nobody has claimed this yet.
A-ffi
C-refactor
E-easy
- Dominant language
- Rust
- Stars
- 16.3k
- Forks
- 1.8k
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 14
Description
The C API will currently abort after catching a panic, for safety reasons. However, we shouldn't abort, but rather catch it and return an error code.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the C API path that catches panics and review how it currently aborts; then trace the error-code convention used by nearby API functions. Done means a caught panic no longer aborts the process and the C API returns an error code, with the behavior covered by the relevant tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, rust
- Domain
- api
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100