emscripten-core / emscripten-core/emscripten

stringToUTF16 trows "Cannot mix BigInt and other types" for wasm64

Open
#25,315 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

$em++ --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 4.0.15 (09f52557f0d48b65b8c724853ed8f4e8bf80e669)

The stringToUTF16 implementation (and most likely UTF32 and other variants) mixes BigInt and Number when doing math on the outPtr.

Can be reproduced with this example:

[main.cpp](https://github.com/user-attachments/files/22423273/main.cpp)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.