emscripten-core / emscripten-core/emscripten

Long preloaded file not properly read on Windows

Open
#19,955 4 comments 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

**Version of emscripten/emsdk:**
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.42 (6ede0b8fc1c979bb206148804bfb48b472ccc3da)
clang version 17.0.0 (https://github.com/llvm/llvm-project f3b64887de61020c09404bfee97b2fadd30df10a)
Target: wasm32-unknown-emscripten
Thread model: posix
```

**Bug Description**

In short, if a very long file (in my case, 116363 lines) is preloaded using `--preload-file`, nothing will go wrong when opening the html or js on linux. However on Windows, not all lines are included (in my case, only 112130 lines could be read), no matter using _node_ or a browser.

A reproducing example can be found at https://github.com/hjenryin/wasm_test. How results can be reproduced can be found in the readme file.

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.