Bug #79279 [NEW]: ext/exif/tests/float_cast_overflow.phpt TC fails on Big endian architecture

From: Date: Tue, 18 Feb 2020 09:23:59 +0000
Subject: Bug #79279 [NEW]: ext/exif/tests/float_cast_overflow.phpt TC fails on Big endian architecture
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-225610@lists.php.net to get a copy of this message
From: vibhutisawant18 at gmail dot com Operating system: Ubuntu 16.04 PHP version: master-Git-2020-02-18 (Git) Package: *Math Functions Bug Type: Bug Bug description:ext/exif/tests/float_cast_overflow.phpt TC fails on Big endian architecture Description: ------------ ext/exif/tests/float_cast_overflow.phpt TC fails on Big endian architecture. The TIFF image used in the Test case is of Little Endian format test@8e9e8232f7f2:~/php/php-src/ext/exif/tests$ xxd float_cast_overflow.tiff | more 00000000: 4949 2a00 8800 0000 0400 0001 0300 0100 II*............. 00000010: 0000 0100 0000 0101 0b00 0100 0000 0100 ................ 00000020: 00f7 0201 0300 00e4 0700 009d 3920 3a35 ............9 :5 00000030: 203a 3533 001d 0010 0005 0000 0080 0020 :53........... 00000040: 2000 0000 0800 0000 0000 0000 0000 0000 ............... 00000050: 0028 1100 0000 0000 0000 0000 0000 0000 .(.............. 00000060: 0000 0000 9cff 0000 0000 8000 2020 0000 ............ .. 00000070: e407 0000 9d39 203a 3533 001d 0010 0005 .....9 :53...... 00000080: 0000 0080 0020 2000 0000 0800 0000 ..... ....... PFB the test log for ext/exif/tests/float_cast_overflow.phpt on Ubuntu:16.04 test@8e9e8232f7f2:~/php/php-src$ sapi/cli/php ext/exif/tests/float_cast_overflow.phpt --TEST-- Overflow in float to int cast --FILE-- array(8) { ["FileName"]=> string(24) "float_cast_overflow.tiff" ["FileDateTime"]=> int(1581566800) ["FileSize"]=> int(142) ["FileType"]=> int(7) ["MimeType"]=> string(10) "image/tiff" ["SectionsFound"]=> string(24) "ANY_TAG, IFD0, THUMBNAIL" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(0) ["ByteOrderMotorola"]=> int(0) } ["THUMBNAIL"]=> array(2) { ["ImageWidth"]=> int(1) ["ImageLength"]=> float(2.3510579257887E-38) } } --EXPECTF-- array(8) { ["FileName"]=> string(24) "float_cast_overflow.tiff" ["FileDateTime"]=> int(%d) ["FileSize"]=> int(142) ["FileType"]=> int(7) ["MimeType"]=> string(10) "image/tiff" ["SectionsFound"]=> string(24) "ANY_TAG, IFD0, THUMBNAIL" ["COMPUTED"]=> array(5) { ["html"]=> string(20) "width="1" height="1"" ["Height"]=> int(1) ["Width"]=> int(1) ["IsColor"]=> int(0) ["ByteOrderMotorola"]=> int(0) } ["THUMBNAIL"]=> array(2) { ["ImageWidth"]=> int(1) ["ImageLength"]=> float(-2.5961487387524E+33) } } The ImagLength returned is ["ImageLength"]=> float(2.3510579257887E-38) whereas ImageLength expected is ["ImageLength"]=> float(-2.5961487387524E+33) -- Edit bug report at https://bugs.php.net/bug.php?id=79279&edit=1 -- Fix committed: https://bugs.php.net/fix.php?id=79279&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=79279&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=79279&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=79279&r=needscript Try newer version: https://bugs.php.net/fix.php?id=79279&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=79279&r=support Expected behavior: https://bugs.php.net/fix.php?id=79279&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=79279&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=79279&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=79279&r=globals PHP version support discontinued: https://bugs.php.net/fix.php?id=79279&r=phptooold Daylight Savings: https://bugs.php.net/fix.php?id=79279&r=dst IIS Stability: https://bugs.php.net/fix.php?id=79279&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=79279&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=79279&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=79279&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=79279&r=mysqlcfg

« previous php.bugs (#225610) next »