bugGnash - The GNU Flash player - Bugs: bug #24363, cxform results...

 
 

bug #24363: cxform results architecture-dependent

Submitted by:  Benjamin Wolsey <bwy>
Submitted on:  Wed 24 Sep 2008 08:14:21 AM UTC  
 
Category: coreSeverity: 3 - Normal
Release: NoneStatus: Fixed
Privacy: PublicAssigned to: Benjamin Wolsey <bwy>
Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

Thu 25 Sep 2008 04:14:34 PM UTC, comment #3:

Works for me.

Sandro Santilli <strk>
Project Member
Thu 25 Sep 2008 02:52:56 PM UTC, comment #2:

This:

(boost::int16_t)(d * 2.56)

has completely different behaviour on different machines with g++. On i386 it returned -32768 for any overflow I tried (e.g double d = 12876000). On x86_64 with g++ machines it truncates, giving -2048.

It's known to be undefined behaviour, so it shouldn't surprise anyone. Shows how unreliable this stuff is.

Benjamin Wolsey <bwy>
Project MemberIn charge of this item.
Thu 25 Sep 2008 02:31:55 PM UTC, comment #1:

Was a bug in character.cpp (alpha_getset), relying on some of this UB overflow stuff (and wrong anyway). Will commit a fix soon.

Benjamin Wolsey <bwy>
Project MemberIn charge of this item.
Wed 24 Sep 2008 08:14:21 AM UTC, original submission:

XPASS: astests-v8-Runner: mcx.transform.colorTransform.toString() == "(redMultiplier=1, greenMultiplier=1, blueMultiplier=1, alphaMultiplier=-128, redOffset=0, greenOffset=0, blueOffset=0, alphaOffset=0)" [./Transform.as:89]

The test sets MovieClip._alpha to 13000; the result should be -32768 (-128 * 256).

Passes:

http://gnashdev.org/buildbot/builders/gnash-i686-deb-etch/builds/141/steps/test/logs/stdio

And strk reports the same (on Debian Etch and Ubuntu?)

Fails (i.e. no xpass):
http://gnashdev.org/buildbot/builders/gnash-amd64-ubuntu-hardy/builds/187/steps/test/logs/stdio

and on my two 64-bit machines, where the result is -32256 (-126 * 256).

It's probably not a priority bug, but it makes me uneasy when arithmetic is architecture-dependent.

Benjamin Wolsey <bwy>
Project MemberIn charge of this item.

 

(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 bwy (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 25 Sep 2008 06:31:23 PM UTCbwyStatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 25 Sep 2008 04:14:34 PM UTCstrkCategoryNone=>core
      Assigned toNone=>bwy
    Thu 25 Sep 2008 02:52:56 PM UTCbwyStatusNone=>Ready For Test

    Back to the top


    Powered by Savane 3.1-cleanup1