[Mono-bugs] [Bug 587994] New: BigInteger.ModPow can get stuck in an infinite loop using up CPU resources

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Mar 12 12:38:35 EST 2010


http://bugzilla.novell.com/show_bug.cgi?id=587994

http://bugzilla.novell.com/show_bug.cgi?id=587994#c0


           Summary: BigInteger.ModPow can get stuck in an infinite loop
                    using up CPU resources
    Classification: Mono
           Product: Mono: Class Libraries
           Version: 2.0.x
          Platform: x86
        OS/Version: Windows Vista
            Status: NEW
          Severity: Critical
          Priority: P5 - None
         Component: Mono.Security
        AssignedTo: spouliot at novell.com
        ReportedBy: michaelw at dip.co.uk
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US)
AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.89 Safari/532.5

Occasionally when using BigInteger.ModPow we find the execution hangs forever
using a large amount of CPU.  Using a performance profiler we can see the
ModulusRing.BarretReduction method has been called once but is performing
millions of calls per second to the Kernel.MinusEq method and Kernel.Compare
method.  We are inputting a random number generated using
BigInteger.GenerateRandom(). 

Reproducible: Sometimes

Steps to Reproduce:
1.Generate a random number using BigInteger.GenerateRandom
2.Perform Mod.Pow using the random number and a BigIntegerPrime
3.Repeat until it sticks


Expected Results:  
executed correctly or produced an exception detailing why.

-- 
Configure bugmail: http://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the mono-bugs mailing list