Library

CrashCatch v1.6.0

Versionv1.6.0
Stars★ 98
Released2026-08-12

Cross-Platform, Efficient easy to integrate crash reporting library for modern C++

Release notes

## v1.6.0 — macOS Support

CrashCatch now supports macOS (Intel & Apple Silicon), joining Windows and Linux as a fully supported platform.

### Added

- **macOS crash handling** via POSIX signals (`SIGSEGV`, `SIGABRT`, `SIGFPE`, `SIGILL`, `SIGBUS`), sharing the same `fork()`-based async-signal-safe architecture as Linux (`posixSignalHandler`, unified across both platforms).
- **Symbol demangling on macOS** — a dedicated backwards-parsing `demangle()` implementation that correctly handles module names containing spaces (e.g. `"Google Chrome Helper"`), unlike a naive forward tokenizer.
- **File/line numbers in macOS stack traces** via `atos` (Xcode Command Line Tools). Batch-resolves all frames in a single call for efficiency. Requires debug symbols — gracefully falls back to `module+symbol+offset` on stripped/Release builds without them.
- **Portable Debug/Release detection** — `Config::buildConfig` now derives from the standard `NDEBUG` macro instead of the MSVC-specific `_DEBUG`, so it correctly reflects build type across MSVC, Clang, and GCC (Windows, Linux, and macOS alike).

### Fixed

- `getExecutablePath()` on macOS now correctly handles executable paths longer than `PATH_MAX` by querying `_NSGetExecutablePath` for the required buffer size first, instead of silently truncating/returning garbage.

### Known Limitations

- **Mach exception interception is not implemented.** Only POSIX signal-based crashes are caught on macOS; research into low-level XNU exception handling is ongoing for a future release.
- **Message boxes are not supported on macOS.** Implementing this would require an Objective-C source file (for `NSAlert`) or shelling out to `osascript`, both of which conflict with the project's single-header goal. No current plan to add this.
- **Integer divide-by-zero (`SIGFPE`) does not trigger on Apple Silicon (ARM64).** This is a hardware/architecture limitation, not a CrashCatch bug. ARM64 doesn't trap on integer division by zero, while x86_64 does (verified working correctly on Intel/emulated x86_64 during testing).
- File/line resolution requires Xcode Command Line Tools (`atos`) and debug symbols to be present; unavailable on stripped Release binaries.

### Testing

Verified on macOS Sequoia (x86_64) covering `SIGSEGV`, `SIGFPE`, custom `Config` fields, and file/line resolution against both Debug and Release builds.

---

Thanks to [@0xsmft](https://github.com/0xsmft) for the initial macOS implementation and ongoing Mach exception research.

Share this resource


Discovered 2026-08-14 Source GitHub Archive 2026-08 →