I find it valuable to understand when my code will crash.
I suppose the issue is moot now on 64-bit architectures, as the difference between 2^62 and 2^63 isn't relevant. (2^62 bytes is 4611686 terrabytes.)
Edit: Well not quite, more like a small closet.
Independent from RV64I, which in turn is independent from (and predates) RV32I.
Yeah, it's very common for computers to have byte addressable 4 exabytes of storage...
Having said that, with the advances of Electron apps, you might very well have a point...
int high = a.length - 1;
tells us that a.length-1 is supposed to fit into an int, so there is no need to handle 2³¹ or larger.Or you could just write the code so it isn't vulnerable to integer overflow.
If not yes frankly you're into such unexpected behaviour territory that you should check your whole codebase rather than rely on stuff working just because it compiled.
And we all know how everyone loves writing and understanding integration tests... (I personally do but most problems in the industry wouldn't be a thing if more people stopped to write them)