20524, "lydia-duncan", "reader and writer channels don't error with a good message when their start is higher than their end", "2022-08-26T16:39:55Z"
Summary of Problem
It is obviously not correct to try to create a reader or writer channel that ends before it starts. However, it would be better to detect this and generate a helpful error message on their creation with a region like this instead of just segfaulting.
Steps to Reproduce
Source Code:
use IO;
var filename = "openreaderLimited.txt";
var readCh = openreader(filename, region=3..0); // Pretty sure this also happens with file.reader and file.writer
var readRes: string;
readCh.readLine(readRes, stripNewline=true);
writeln(readRes);
readCh.close();
Compile command: chpl foo.chpl
Execution command: ./foo
Requires the specified file exists, but I don't think the contents matter.