Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: upgrade wasm-bindgen to fix str free err #353

Merged
merged 2 commits into from
May 9, 2024
Merged

Conversation

zxch3n
Copy link
Member

@zxch3n zxch3n commented May 9, 2024

This is a bug triggered by wasm-bindgen. It's fixed already rustwasm/wasm-bindgen#3808.

The bevaior is when you insert '“aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' to a LoroText in JS, it panics with the following error message:

005573b2:0x1426a5 panicked at /rust/deps/dlmalloc-0.2.6/src/dlmalloc.rs:1198:13:
assertion failed: psize <= size + max_overhead

Stack:

Error
    at __wbg_new_abda76e883ba8a5f (https://local.kymyth.com:5173/node_modules/.vite/deps/loro-crdt.js?v=e1fe92cd:4264:15)
    at wasm://wasm/005573b2:wasm-function[2447]:0x142628
    at wasm://wasm/005573b2:wasm-function[842]:0xe17f0
    at wasm://wasm/005573b2:wasm-function[1916]:0x13738f
    at wasm://wasm/005573b2:wasm-function[1854]:0x135167
    at wasm://wasm/005573b2:wasm-function[2303]:0x13fb40
    at wasm://wasm/005573b2:wasm-function[1139]:0x106da7
    at _LoroText.insert (https://local.kymyth.com:5173/node_modules/.vite/deps/loro-crdt.js?v=e1fe92cd:3125:12)
    at https://local.kymyth.com:5173/src/components/editor-crdt.tsx:25:22
    at iterChanges (https://local.kymyth.com:5173/node_modules/.vite/deps/chunk-7JK3LPOR.js?v=65bcb074:1074:7)

@zxch3n zxch3n requested a review from Leeeon233 May 9, 2024 06:58
@zxch3n zxch3n merged commit 0660b1a into main May 9, 2024
1 check passed
@zxch3n zxch3n deleted the fix-text-free-err branch May 9, 2024 07:22
@github-actions github-actions bot mentioned this pull request May 9, 2024
zxch3n added a commit that referenced this pull request May 9, 2024
* fix: upgrade wasm-bindgen to fix str free err

* chore: fix ci
@github-actions github-actions bot mentioned this pull request May 20, 2024
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.

None yet

2 participants