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

matrix-js-sdk's unit tests fail against matrix-rust-sdk 0.10.0 #4672

Closed
richvdh opened this issue Feb 14, 2025 · 1 comment · Fixed by matrix-org/matrix-rust-sdk-crypto-wasm#205

Comments

@richvdh
Copy link
Member

richvdh commented Feb 14, 2025

Attempts to build matrix-js-sdk against latest matrix-rust sdk (matrix-org/matrix-js-sdk#4710) fail spectacularly, with errors such as:

Error: RuntimeError: memory access out of bounds

    at dlmalloc::dlmalloc::Dlmalloc<A>::malloc::hf8a67dcfc015198c (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:1116238)
    at __rust_alloc (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3660961)
    at alloc::alloc::Global::alloc_impl::h9ad6c4e8df741cce.161 (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3511853)
    at <alloc::alloc::Global as core::alloc::Allocator>::allocate::hc8e006bb905e0b48.160 (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3498526)
    at alloc::raw_vec::RawVecInner<A>::try_allocate_in::h2c50790afc640f64 (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3042789)
    at <T as core::convert::Into<U>>::into::ha7c59c96056e8f20 (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3389301)
    at userid_new multivalue shim (wasm:/wasm/matrix_sdk_crypto_wasm.wasm-014788a2:1:3570699)
    at new UserId (node_modules/@matrix-org/matrix-sdk-crypto-wasm/pkg/matrix_sdk_crypto_wasm_bg.cjs:8954:22)
    at src/rust-crypto/index.ts:155:9
    at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
    at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)
    at node_modules/@babel/runtime/helpers/asyncToGenerator.js:22:7
    at node_modules/@babel/runtime/helpers/asyncToGenerator.js:14:12
    at apply (src/rust-crypto/index.ts:142:30)
    at initOlmMachine (src/rust-crypto/index.ts:125:30)
    at asyncGeneratorStep (node_modules/@babel/runtime/helpers/asyncToGenerator.js:3:17)
    at _next (node_modules/@babel/runtime/helpers/asyncToGenerator.js:17:9)

Having bisected, it looks like our problems began with 9ff3761.

@richvdh
Copy link
Member Author

richvdh commented Feb 16, 2025

Having bisected, it looks like our problems began with 9ff3761.

Hrm no, I think my bisection was faulty. If I revert #193, the tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant