[Mono-dev] Overflowed double->int casts on ARM in MS referencesource
sebastien.pouliot at gmail.com
Tue Mar 24 00:20:28 UTC 2015
On Mon, Mar 23, 2015 at 7:47 PM, Alexander Köplinger <
alex.koeplinger at outlook.com> wrote:
> I just noticed this commit by @spouliot:
> In my opinion, this isn't the right approach, we should rather fix the
> cases where a cast would overflow in MS referencesource code rather than
> changing the tests.
> I sent a PR a week or so ago that fixes the particular DateTime tests on
> ARM by explictly checking if the value fits into long, which I think is
> better: https://github.com/mono/referencesource/pull/8
Feel free to revert that commit once you PR lands. It's goal is to clear up
issues* for the next XI release.
* or non-issue in that case, DateTime works just fine
> There are a couple more of these overflows in MS code that make tests fail
> and I think we should discuss what the best approach is. What are your
The real problems with unspecified values (double casted to long) is that:
a) it's unrelated to the feature being tested (i.e. it was not a DateTime
b) you can only fix the BCL for the cases we know. It's pure luck that
those tests exists, i.e. they were not written to test that condition. That
means it solves one of potentially many cases.
That being said it's still worth fixing the known cases inside the BCL
source itself - even if it requires a bit more code and is not complete :-)
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Mono-devel-list