emscripten-core / emscripten-core/emscripten
wasm64: bufferSubData fails after heap grows beyond 4 GB
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
**Version of emscripten/emsdk:**
```sh
|-> $ emcc -v
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.47 (431685f05c67f0424c11473cc16798b9587bb536)
clang version 18.0.0 (https://github.com/llvm/llvm-project 21030b9ab4487d845e29792063f5666d8c4b8e09)
Target: wasm32-unknown-emscripten
Thread model: posix
InstalledDir: /home/local/KHQ/jaswant.panchumarti/Documents/code/ansys/vtk-wasm-memory-branch/emsdk/upstream/bin
```
Error:
```js
Uncaught (in promise) TypeError: Failed to execute 'bufferSubData' on 'WebGL2RenderingContext': parameter 3 is not of type 'ArrayBufferView'.
at _glBufferSubData (vtkWasmRendererApplication.js:7581:17)
```
From debugger, it looks like HEAPU8 is a proxy object due to changes introduced by https://github.com/emscripten-core/emscripten/pull/19737. What is the approach to make the proxy recognizable by `bufferSubData`?

Contributor guide
Assessment
This issue has not been assessed yet.