macOS crash: Heap corruption detected in malloc (abort)

Resolved 💬 3 comments Opened Mar 11, 2026 by JohnGalt017 Closed Mar 14, 2026

Bug Report

Description

Claude Code crashes with heap corruption error on macOS. The process aborts with a malloc error.

Error Output

claude(21527,0x16e817000) malloc: Heap corruption detected, free list is damaged at 0x600001b9b9c0
*** Incorrect guard value: 7161396554374328624
claude(21527,0x16e817000) malloc: *** set a breakpoint in malloc_error_break to debug
zsh: abort      claude

Environment

  • Claude Code version: 2.1.72
  • OS: macOS 15.3 (Sonoma) Build 24D60
  • Hardware: MacBook Air
  • Shell: zsh

Steps to Reproduce

Running Claude Code normally — crash occurs during session.

Expected Behavior

Claude Code should not abort with heap corruption.

Additional Context

This appears to be a memory corruption issue in the native malloc allocator on macOS. The Incorrect guard value suggests a buffer overflow or use-after-free scenario corrupting the heap free list.

View original on GitHub ↗

This issue has 3 comments on GitHub. Read the full discussion on GitHub ↗