Bug 28297 - NullReferenceException in GreatestCommonDivisor
Summary: NullReferenceException in GreatestCommonDivisor
Status: RESOLVED FIXED
Alias: None
Product: Class Libraries
Classification: Mono
Component: System ()
Version: 3.12.0
Hardware: PC Windows
: --- normal
Target Milestone: Untriaged
Assignee: Marek Safar
URL:
Depends on:
Blocks:
 
Reported: 2015-03-21 19:26 UTC by donsyme
Modified: 2015-03-25 10:32 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED FIXED

Description donsyme 2015-03-21 19:26:01 UTC
The F# CI tests show a bug in the following code for GreatestCommonDivisor. These are new tests recently added by the Visual F# Tools team.

let bigPositiveA = 12345678901234567890I
let bigPositiveB = 98765432109876543210I

Assert.AreEqual(BigInteger.GreatestCommonDivisor(bigPositiveA, bigPositiveB), 900000000090I)
Assert.AreEqual(BigInteger.GreatestCommonDivisor(bigNegativeA, bigNegativeB), 900000000090I)
Assert.AreEqual(BigInteger.GreatestCommonDivisor(0I, bigPositiveA), bigPositiveA)

Errors and Failures:
1) Test Error : FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Math.BigIntType.GreatestCommonDivisor
   System.NullReferenceException : Object reference not set to an instance of an object
  at System.Numerics.BigInteger.GreatestCommonDivisor (BigInteger left, BigInteger right) [0x00000] in <filename unknown>:0 
  at FSharp.Core.Unittests.FSharp_Core.Microsoft_FSharp_Math.BigIntType.GreatestCommonDivisor () [0x00000] in <filename unknown>:0 
  at (wrapper managed-to-native) System.Reflection.MonoMethod:InternalInvoke (System.Reflection.MonoMethod,object,object[],System.Exception&)
  at System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) [0x00000] in <filename unknown>:0 

Full log here: https://s3.amazonaws.com/archive.travis-ci.org/jobs/55322327/log.txt
Comment 1 Marek Safar 2015-03-25 10:32:52 UTC
Fixed in Mono 4.0