From 78ff9ebb6bb501dff995727512c38fdeff50021b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Andr=C3=A9=20dos=20Santos=20Lopes?= Date: Tue, 22 May 2012 12:36:28 +0200 Subject: Fixed bug #62097 This fixes the fix for bug #54547 in 32-bit machines by accepting float comparisons in 32-bit machines as long as the integer is not larger than the mantissa. --- Zend/tests/bug62097.phpt | 17 +++++++++++++++++ Zend/zend_operators.c | 6 ++++++ 2 files changed, 23 insertions(+) create mode 100644 Zend/tests/bug62097.phpt diff --git a/Zend/tests/bug62097.phpt b/Zend/tests/bug62097.phpt new file mode 100644 index 0000000000..bee72e7a23 --- /dev/null +++ b/Zend/tests/bug62097.phpt @@ -0,0 +1,17 @@ +--TEST-- +Bug #62097: fix for bug #54547 is wrong for 32-bit machines +--SKIPIF-- + 9007199254740991. /*0x1FFFFFFFFFFFFF*/) + || (oflow1 == -1 && dval1 < -9007199254740991.))) { +#else if (oflow1 != 0 && oflow1 == oflow2 && dval1 - dval2 == 0.) { +#endif /* both values are integers overflown to the same side, and the * double comparison may have resulted in crucial accuracy lost */ goto string_cmp; -- cgit v1.2.1