Link: Fix some bugs related to an unexpected end of file by benharsh · Pull Request #23958 · chapel-lang/chapel · GitHub
Fix some bugs related to an unexpected end of file (#23958)
This PR addresses two bugs related to potentially unexpected end of file
fileReader.readwas not returning
failed to read an entire array. The solution is to check the returned
value of a
readBulkElementsand throw an EOF error
if it is false.
- The version of
fileReader.readBinarythat accepts a
refintent was not correctly throwing an
despite the documentation clearly stating it should. The solution
involves a change to the runtime in
check if we got an EOF and failed to read the expected amount of bytes.
This PR also retires a .future and updates the test to be more robust. A
new test specifically for the readBinary-numeric case is also added.