dart:io File readAsBytes() doesn't handle large files #35890
Labels
area-core-library
SDK core library issues (core, async, ...); use area-vm or area-web for platform specific libraries.
library-io
P2
A bug or feature request we're likely to work on
type-bug
Incorrect behavior (everything from a crash to more subtle misbehavior)
dart:io's File class doesn't handle large files (files at least 2 GIB) properly in readAsBytes() and (readAsBytesSync() has related if different problems). Instead it attempts to return an invalid array of negative size (-4096).
For instance, make a big file:
Then this program shows the problem:
Which fails like this:
The text was updated successfully, but these errors were encountered: