[Crash] malloc error: pointer being freed was not allocated on macOS 15 (ARM-64) #9040

Closed
opened 2026-02-16 18:11:29 -05:00 by yindo · 6 comments
Owner

Originally created by @Lxj96 on GitHub (Feb 10, 2026).

Originally assigned to: @rekram1-node on GitHub.

Description

opencode crashes immediately upon launch (e.g., opencode .) on macOS 15.0.1. The terminal outputs a malloc error, and the system crash log points to an invalid memory deallocation during thread exit.

opencode(7914,0x16fecf000) malloc: *** error for object 0x10841f300: pointer being freed was not allocated

Plugins

oh-my-opencode、superpowers

OpenCode version

1.1.56

Steps to reproduce

Open iTerm2 or any terminal on macOS Sequoia.
Navigate to any project directory.
Run opencode .
The process terminates immediately with a malloc error.

Screenshot and/or share link

Thread 22 Crashed:: Wasm Worklist Helper Thread
0 libsystem_c.dylib __abort + 168
1 libsystem_c.dylib abort + 140
2 libsystem_malloc.dylib malloc_vreport + 896
3 libsystem_malloc.dylib malloc_report + 64
4 libsystem_malloc.dylib find_zone_and_free + 528
5 libsystem_pthread.dylib _pthread_tsd_cleanup + 552
6 libsystem_pthread.dylib _pthread_exit + 84

error.txt

Operating System

macOS 15.0.1 (24A348)

Terminal

iTerm2

Originally created by @Lxj96 on GitHub (Feb 10, 2026). Originally assigned to: @rekram1-node on GitHub. ### Description opencode crashes immediately upon launch (e.g., opencode .) on macOS 15.0.1. The terminal outputs a malloc error, and the system crash log points to an invalid memory deallocation during thread exit. opencode(7914,0x16fecf000) malloc: *** error for object 0x10841f300: pointer being freed was not allocated ### Plugins oh-my-opencode、superpowers ### OpenCode version 1.1.56 ### Steps to reproduce Open iTerm2 or any terminal on macOS Sequoia. Navigate to any project directory. Run opencode . The process terminates immediately with a malloc error. ### Screenshot and/or share link Thread 22 Crashed:: Wasm Worklist Helper Thread 0 libsystem_c.dylib __abort + 168 1 libsystem_c.dylib abort + 140 2 libsystem_malloc.dylib malloc_vreport + 896 3 libsystem_malloc.dylib malloc_report + 64 4 libsystem_malloc.dylib find_zone_and_free + 528 5 libsystem_pthread.dylib _pthread_tsd_cleanup + 552 6 libsystem_pthread.dylib _pthread_exit + 84 [error.txt](https://github.com/user-attachments/files/25224856/error.txt) ### Operating System macOS 15.0.1 (24A348) ### Terminal iTerm2
yindo added the bug label 2026-02-16 18:11:29 -05:00
yindo closed this issue 2026-02-16 18:11:29 -05:00
Author
Owner

@github-actions[bot] commented on GitHub (Feb 10, 2026):

This issue appears to be a duplicate of #13064.

Both report the same malloc error on macOS 15.x:

  • Error: pointer being freed was not allocated
  • Version: 1.1.56
  • Environment: macOS 15 (Sequoia)
  • Root cause: Memory deallocation during thread exit (Wasm Worklist Helper Thread)

The key difference is timing (#13064 crashes after ~10 seconds vs #13072 crashes immediately), but both stem from the same underlying memory corruption issue.

Please check #13064 for any existing workarounds or updates. Consider consolidating discussions there to avoid duplicate efforts.

@github-actions[bot] commented on GitHub (Feb 10, 2026): This issue appears to be a duplicate of #13064. Both report the same malloc error on macOS 15.x: - **Error**: `pointer being freed was not allocated` - **Version**: 1.1.56 - **Environment**: macOS 15 (Sequoia) - **Root cause**: Memory deallocation during thread exit (Wasm Worklist Helper Thread) The key difference is timing (#13064 crashes after ~10 seconds vs #13072 crashes immediately), but both stem from the same underlying memory corruption issue. Please check #13064 for any existing workarounds or updates. Consider consolidating discussions there to avoid duplicate efforts.
Author
Owner

@bestkxt commented on GitHub (Feb 11, 2026):

私も同じ問題を抱えています。どうすればいいのか教えていただけますか? opencode-ai v1.1.53に戻しましたが、まだ動きません。

@bestkxt commented on GitHub (Feb 11, 2026): 私も同じ問題を抱えています。どうすればいいのか教えていただけますか? opencode-ai v1.1.53に戻しましたが、まだ動きません。
Author
Owner

@Y4tacker commented on GitHub (Feb 11, 2026):

the same as me😂

@Y4tacker commented on GitHub (Feb 11, 2026): the same as me😂
Author
Owner

@Lxj96 commented on GitHub (Feb 11, 2026):

私も同じ問題を抱えています。どうすればいいのか教えていただけますか? opencode-ai v1.1.53に戻しましたが、まだ動きません。
我还没有解决这个问题; #13064 他们通过brew安装的1.1.53版本是没有问题的。但是我通过npm安装的1.1.53版本不工作,我不确定是不是因为它没有卸载干净。

@Lxj96 commented on GitHub (Feb 11, 2026): > 私も同じ問題を抱えています。どうすればいいのか教えていただけますか? opencode-ai v1.1.53に戻しましたが、まだ動きません。 我还没有解决这个问题; #13064 他们通过brew安装的1.1.53版本是没有问题的。但是我通过npm安装的1.1.53版本不工作,我不确定是不是因为它没有卸载干净。
Author
Owner

@HerculeLiu commented on GitHub (Feb 11, 2026):

I got the same issue, either iTerm2 or Terminal
opencode --version : 1.1.56
ProductName: macOS
ProductVersion: 15.0.1

I tried reinstall 1.1.53, but it does not help anything

@HerculeLiu commented on GitHub (Feb 11, 2026): I got the same issue, either iTerm2 or Terminal opencode --version : 1.1.56 ProductName: macOS ProductVersion: 15.0.1 I tried reinstall 1.1.53, but it does not help anything
Author
Owner

@R44VC0RP commented on GitHub (Feb 11, 2026):

Duplicate of #13064. Same malloc error on macOS 15 ARM-64 with v1.1.56.

This looks like a Bun 1.3.8 + macOS 15 compatibility issue with WASM thread cleanup. The crash happens in the "Wasm Worklist Helper Thread" during _pthread_exit, which is likely related to web-tree-sitter (used by the bash tool for command parsing).

We'll investigate the root cause in #13064.

@R44VC0RP commented on GitHub (Feb 11, 2026): Duplicate of #13064. Same malloc error on macOS 15 ARM-64 with v1.1.56. This looks like a Bun 1.3.8 + macOS 15 compatibility issue with WASM thread cleanup. The crash happens in the "Wasm Worklist Helper Thread" during `_pthread_exit`, which is likely related to web-tree-sitter (used by the bash tool for command parsing). We'll investigate the root cause in #13064.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#9040