Repository navigation
Fix Array.Reverse incorrectly validating index - #1297
Conversation
We need to actually check GetLowerBound
|
I'll let Jan review this, but .NET Native doesn't have a real support for non-zero lower bounds. We have code that pretends to handle them here and there, but you can't actually create an array like that (it will throw). We can try to fix these, but without regression tests (which can't be written because you can't create them), we still don't know if this works as expected. In a way you can look at the 0 lower bound assumption as a perf optimization. |
|
I agree. There are number of places where the calls to |
|
Sure - should I close this then? It seems to not make much sense why some methods check for the lower bounds and others dont |
Agreed. We might want to make a call here:
|
|
The perf optimization can be still done even with I think it is goodness to make the code same as CoreCLR - which this change does. |
|
Thanks! |
We need to actually check GetLowerBound
This could be a breaking change, but very unlikely as mscorlib validates the index correctly.
/cc @jamesqo @jkotas