Small example to reproduce a bug in MinGW-W64's standard lib
- Clone the repo and enter directory
git clone https://github.com/j-hap/mingw-w64-bug-large-binary-chunk.git cd mingw-w64-bug-large-binary-chunk - create a file that is at least
INT32_MAX + 1 = 2147483648Bytes in size
Windows:Linux:fsutil file createnew test.dat 2147483649fallocate -l 2147483649 test.dat - Setup up environment (depends on your compiler, OS, shell, etc.)
- Build
cmake -S . -B ./out cmake --build ./out - Run (executable may be in a subdirectory, depending on the build tool)
./out/mingw-w64-bug-large-binary-chunk*