HeadlinesBriefing favicon HeadlinesBriefing.com

ripgrep 15.2.0 musl segfault large searches

Hacker News •
×

The ripgrep 15.2.0 binary for x86_64-unknown-linux-musl occasionally crashes with SIGSEGV during very-large searches at high concurrency. The fault occurs in MUSL's mallocng heap metadata integrity assertion inside a `calloc` call originating from `opendir`. The crashing binary is byte-for-byte identical to the official release from Burnt Sushi and was also encountered in the version bundled with Open AI Codex.

Reproduction requires a sufficiently large search tree. A provided script generates roughly 20GiB of data across 1.8M files mimicking real repository statistics. Running `rg` in a loop searching for an absent string on a 24-core system with the tree cached in RAM typically triggers the segfault within a minute.

The backtrace shows the crash propagating from `ignore::walk::Worker::run` through `std::fs::read_dir` and `opendir` into MUSL's `mallocng/meta.h:141`. The issue manifests on Open SUSE Tumbleweed Linux x86_64 and appears specific to the musl target; the reporter built a debug-symbol version via `cross` with `CARGO_PROFILE_RELEASE_DEBUG=true` for analysis.