Skip to content

fix(wasm): correct several bugs in realloc#5264

Merged
WillLillis merged 2 commits intotree-sitter:release-0.26from
WillLillis:backport/wasm_alloc_fixes
Jan 27, 2026
Merged

fix(wasm): correct several bugs in realloc#5264
WillLillis merged 2 commits intotree-sitter:release-0.26from
WillLillis:backport/wasm_alloc_fixes

Conversation

@WillLillis
Copy link
Member

Backport of #5261 failed. Here's a manual one.

WillLillis and others added 2 commits January 26, 2026 21:19
- free memory if 0 size is passed in
- Don't `memcpy` contents if new pointer is `NULL`
- Copy old region's contents only up to size of new region
- free old region

Co-authored-by: trim21 <i@trim21.me>
Co-authored-by: trim21 <i@trim21.me>
@WillLillis WillLillis merged commit 88a5475 into tree-sitter:release-0.26 Jan 27, 2026
19 checks passed
@WillLillis WillLillis deleted the backport/wasm_alloc_fixes branch January 27, 2026 04:36
@trim21
Copy link
Contributor

trim21 commented Jan 27, 2026

is there a ETA on next 0.26 release?

@clason
Copy link
Contributor

clason commented Jan 27, 2026

Soon(tm). We need to make sure these fixes actually fix things (so testing and confirming helps move this along).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants