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: Marcus Urban
Subject: [Pnet-developers] [bugs #9053] ilrun throws exception when parsing hex values
User-agent: Mozilla/5.0 (compatible; Konqueror/3.2; Linux 2.4.21-144-athlon; X11; i686; en_US, en) (KHTML, like Gecko)

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




/**************************************************************************/
[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/04 at 03:02

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


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()






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

-------------------------------------------------------
Date: Sat 05/22/04 at 03:02  Name: parse-bug.cs  Size: 199KB   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]