finds.dev← search

// the find

dhatbj/SignalRecovery

★ 54 · C · Apache-2.0 · updated Mar 2019

A C library that keep your program from crashing when illegal access occurs.

A C library that catches POSIX signals (SIGSEGV, SIGFPE, etc.) using sigsetjmp/siglongjmp to give you a try/catch-style escape hatch from crashes. Aimed at iOS/macOS/Linux developers who need to survive crashes in third-party code or buy time before a proper fix. The README is admirably honest about why you probably shouldn't use it.

The sigsetjmp/siglongjmp approach is the correct mechanism for this — no magic, just the POSIX primitives done right. Thread safety and nested try/catch support are handled, which are the two obvious failure modes for a naive implementation. The README explicitly warns against using this as a long-term fix, which shows the author understands the tradeoffs. Single-file implementation means integration is trivial.

Abandoned since 2019 — no updates in seven years, which matters for a library touching signal handling on platforms that keep changing. No Windows support, so if your crash happens on a platform not listed, you're writing the port yourself. Stack unwinding skips destructors and cleanup code, meaning memory and resource leaks are essentially guaranteed in any non-trivial catch block — the README mentions this but it deserves more emphasis. 54 stars and no CI means you're adopting untested code for one of the most dangerous patterns in systems programming.

View on GitHub →

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →