bugGnash - The GNU Flash player - Bugs: bug #19191, Ming gets large number parsing...

 
 

bug #19191: Ming gets large number parsing wrong

Submitted by:  Martin Guy <martinwguy>
Submitted on:  Sat 03 Mar 2007 02:00:43 PM UTC  
 
Category: testsuiteSeverity: 1 - Wish
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: None
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Wed 25 Jul 2007 01:17:54 PM UTC, comment #4:

Patch was committed.

Sandro Santilli <strk>
Project Member
Thu 17 May 2007 07:27:50 PM UTC, comment #3:

Patch for Ming has been contributed:

http://bugs.libming.org/show_bug.cgi?id=15

Still not applied though.

Sandro Santilli <strk>
Project Member
Sat 03 Mar 2007 03:33:32 PM UTC, comment #2:

I wouldn't call this a Ming bug, rather it's a feature request.
Integer numbers in ActionScript are 32bit long, so you do
have to use a float if you want to go over that limit.

The "feature" would be for Ming to take your integer as
a float to help you... anyway the problem will persist
if you go over float boundaries.

Sandro Santilli <strk>
Project Member
Sat 03 Mar 2007 02:07:13 PM UTC, comment #1:

My mistake. Ming returns large integer constants as 2147483647 (not the difference), but large constants with an explicit ".0" on the end are returned correctly.

trace (946684800000);
trace (946684800000.0);

gives

14:04:26: TRACE: 2147483647
14:04:26: TRACE: 946684800000

Martin Guy <martinwguy>
Sat 03 Mar 2007 02:00:43 PM UTC, original submission:

Ming's parsing of large integers is broken.

Revealed by:

check(Date.UTC(2000,0,1).valueOf() == 946684800000)
fails although
check(Date.UTC(2000,0,1).valueOf().toString() == "946684800000")
succeeds.

More pointedly:

trace(946684800000)
outputs
13:55:40: TRACE: 944537316353

The difference between the two values is exactly 2147483647 or 2^31-1

Martin Guy <martinwguy>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by strk (Posted a comment)
  • -unavailable- added by martinwguy (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 25 Jul 2007 01:17:54 PM UTCstrkOpen/ClosedOpen=>Closed
    Wed 25 Jul 2007 01:17:53 PM UTCstrkStatusNone=>Fixed
    Thu 17 May 2007 07:27:50 PM UTCstrkSeverity3 - Normal=>1 - Wish

    Back to the top


    Powered by Savane 3.1-cleanup