dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Pnet-developers] [bugs #9053] ilrun throws exception when parsing hex v


From: Gopal.V
Subject: [Pnet-developers] [bugs #9053] ilrun throws exception when parsing hex values
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.6) Gecko/20040206 Firefox/0.8

This mail is an automated notification from the bugs tracker
 of the project: DotGNU Portable.NET.

/**************************************************************************/
[bugs #9053] Latest Modifications:

Changes by: 
                Gopal.V <address@hidden>
'Date: 
                Mon 07/19/2004 at 16:19 (Asia/Calcutta)

            What     | Removed                   | Added
---------------------------------------------------------------------------
          Resolution | None                      | Fixed
              Status | Open                      | Closed


------------------ Additional Follow-up Comments ----------------------------
Fixed in CVS on 19th-July-2004






/**************************************************************************/
[bugs #9053] Full Item Snapshot:

URL: <http://savannah.gnu.org/bugs/?func=detailitem&item_id=9053>
Project: DotGNU Portable.NET
Submitted by: Marcus Urban
On: Sat 05/22/2004 at 03:02

Category:  None
Severity:  5 - Average
Item Group:  None
Resolution:  Fixed
Assigned to:  None
Status:  Closed


Summary:  ilrun throws exception when parsing hex values

Original Submission:  When parsing a numeric string in hexadecimal form (using 
NumberStyles.AllowHexSpecifer), Int32.Parse() on .NET treats values greater 
than 0x7fffffff as negative numbers. For example, 0xf0000000 turns in the 
decimal value -268435456, instead of throwing an exception. On the other hand, 
ilrun throws an exception. From reading the docs, throwing an exception seems 
like the correct behavior, but this is not consistent with the behavior under 
Rotor. I will double-checked on .NET as soon as I find someone to run it for me.

The attached program prints -268435456 on Rotor but throws an exception on 
ilrun:

Uncaught exception: System.OverflowException: Valid Int32 values are between 
-2147483648 and 2147483647, inclusive
        at System.Private.NumberParser.ParseInt32(String, NumberStyles, 
NumberFormatInfo, Int32) in ./System/Private/NumberParser.cs:605
        at System.Int32.Parse(String, NumberStyles, IFormatProvider) in 
./System/Int32.cs:78
        at System.Int32.Parse(String, NumberStyles) in ./System/Int32.cs:91
        at Testing.Main()


Follow-up Comments
------------------


-------------------------------------------------------
Date: Mon 07/19/2004 at 16:19       By: t3rmin4t0r
Fixed in CVS on 19th-July-2004

-------------------------------------------------------
Date: Sat 05/22/2004 at 03:14       By: mathpup
pr0c ran the program for me under .NET and confirmed that .NET also prints 
-268435456 instead of throwing an exception.







File Attachments
-------------------

-------------------------------------------------------
Date: Sat 05/22/2004 at 03:02  Name: parse-bug.cs  Size: 199B   By: mathpup
Test case
http://savannah.gnu.org/bugs/download.php?item_id=9053&amp;item_file_id=1335






For detailed info, follow this link:
<http://savannah.gnu.org/bugs/?func=detailitem&item_id=9053>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]