Closed krasin closed 9 years ago
Cannot reproduce (*), either with wget or /dev/urandom. (Linux jagadai 3.1.9-2-ARCH #1 SMP PREEMPT Sat Jan 14 09:11:37 CET 2012 x86_64 Intel(R) Core(TM)2 Duo CPU P8700 @ 2.53GHz GenuineIntel GNU/Linux) What OS are you on? This is a strange error to be getting, since it /should/ imply that an attempt was made to create a slice larger than 2GB. I notice that the url you give in that command does not match the filename given in the panic - is the file you're actually downloading larger than 2GB? (*) I can reproduce if I run read_file on a file >2GB.
That makes more sense - ReadFile is trying to create a 15GB slice, and can't (even if your machine is 32 bytes). Your solution is to manually call Read() multiple times, and process the file bit-by-bit. (Note that if you run read_file while the file is still being downloaded, it will /not/ wait to finish until the whole file is downloaded. Ordinary files can't be used as FIFOs.) Perhaps the size limitations on slices should be documented in the spec? (Or better, removed? It does feel somewhat artificial.)