When grep crashes: tracing ripgrep + MUSL mallocng segfaults in huge directory walks
systems programming Aug 01, 2026 6 min read

When grep crashes: tracing ripgrep + MUSL mallocng segfaults in huge directory walks

A reported ripgrep crash affects x86_64 MUSL builds during massive directory walks. The SIGSEGV comes from musl mallocng integrity checks triggered via calloc→opendir while Rust threads iterate directories. The takeaway: allocator invariants can fail under extreme size + concurrency, and the stack trace points straight at that boundary.

by ahsan