Claude Code 2.1.243 segfaults on startup in __newlocale on glibc 2.44 (Bun/mimalloc build)
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Claude Code 2.1.243 crashes with SIGSEGV (SEGV_MAPERR) on every startup, before reading any input, on Arch Linux with glibc 2.44. Any invocation segfaults — claude, claude --version, claude doctor.
The crash is in glibc's __newlocale calling free into the bundled mimalloc allocator during process init (under pthread_once, under __libc_start_main). This started after the glibc 2.43 → 2.44 upgrade (2026-07-28).
Ruled out:
- Not the locale:
LC_ALL=C.UTF-8 claude --versionalso segfaults; locale is C.UTF-8 throughout and valid. - Not ELF symbol interposition:
nm -Ddoes not exportfree, so glibc can't resolve to mimalloc'sfreevia the dynamic scope. The mimalloc override is applied at runtime, not via dynsym.
Reinstalling to 2.1.245 fixes it. Filing to document the affected range and confirm the fix intentionally covers the glibc-2.44 / mimalloc-init path.
What Should Happen?
Claude Code should start normally on glibc 2.44 without crashing during locale initialization.
Error Messages/Logs
Signal: 11 (SEGV) si_code: SEGV_MAPERR
Executable: ~/.local/share/claude/versions/2.1.243
Stack trace of thread 2722:
#0 0x0000000001d10458 free (2.1.243 + 0x1b10458) <- bundled mimalloc
#1 0x00007f...530a __newlocale (libc.so.6 + 0x3530a)
#2 0x0000000001abd282 n/a (2.1.243 + 0x18bd282)
#3 0x00007f...d69c n/a (libc.so.6 + 0x9d69c)
#4 0x00007f...d719 pthread_once (libc.so.6 + 0x9d719)
#16 0x00007f...7892 __libc_start_main (libc.so.6 + 0x27892)
#17 0x0000000001953a2e n/a (2.1.243 + 0x1753a2e)
# Diagnostics
$ nm -D .../2.1.243 | grep -E ' T (malloc|free|calloc|realloc)$'
(empty — allocator not exported dynamically)
$ nm .../2.1.243 | grep -E ' [Tt] free$'
0000000001d10430 T free (mimalloc, in .symtab)
$ ldd .../2.1.243
libc.so.6 => /usr/lib/libc.so.6
Steps to Reproduce
- Arch Linux with glibc 2.44 (upgraded from 2.43).
- Install Claude Code 2.1.243 (Bun-compiled native binary).
- Run
claude --version(or any invocation). - Process crashes immediately: "Segmentation fault (core dumped)".
100% reproducible. LC_ALL=C.UTF-8 does not help.
Claude Model
None
Is this a regression?
Yes, this worked in a previous version
Last Working Version
unknown — no earlier build on disk to bisect
Claude Code Version
2.1.245 (Claude Code)
Platform
Anthropic API
Operating System
Other Linux
Terminal/Shell
Other
Additional Information
- glibc: 2.44+r5+g7cba77790f32-1 (upgraded from 2.43 on 2026-07-28)
- Binary: ELF 64-bit, dynamically linked to libc.so.6, Bun-compiled with static mimalloc, not stripped.
- Likely cause: glibc 2.44 changed internal alloc/free behavior in __newlocale; the bundled mimalloc runtime intercepts that free and receives a pointer it never allocated → SEGV_MAPERR before init completes. Any build compiled/tested against glibc ≤ 2.43 appears affected; 2.1.245 resolves it.
- Workaround for other affected users: reinstall via
curl -fsSL https://claude.ai/install.sh | bash. - I can attach the full raw
coredumpctl infoand the .zst core on request.
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗