tyrael Tue, 27 Sep 2011 00:53:41 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=317366
Log:
split the ext/calendar/tests/bug53574.phpt into two test, as we expect
different result on 32 and 64 bit
Bug: https://bugs.php.net/53574 (Re-Opened) Integer overflow in SdnToJulian
Changed paths:
D php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt
A + php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_1.phpt
(from
php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt:r317364)
A + php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_2.phpt
(from
php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt:r317364)
D php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt
A + php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_1.phpt
(from
php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt:r317364)
A + php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_2.phpt
(from
php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt:r317364)
D php/php-src/trunk/ext/calendar/tests/bug53574.phpt
A + php/php-src/trunk/ext/calendar/tests/bug53574_1.phpt
(from php/php-src/trunk/ext/calendar/tests/bug53574.phpt:r317364)
A + php/php-src/trunk/ext/calendar/tests/bug53574_2.phpt
(from php/php-src/trunk/ext/calendar/tests/bug53574.phpt:r317364)
Deleted: php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt
===================================================================
--- php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt 2011-09-27 00:42:56 UTC (rev 317365)
+++ php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -1,35 +0,0 @@
---TEST--
-Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
---SKIPIF--
-<?php include 'skipif.inc'; ?>
---FILE--
-<?php
-if (PHP_INT_MAX == 0x7FFFFFFF) {
- $x = 882858043;
-} else {
- $x = 3315881921229094912;
-}
-
-var_dump(cal_from_jd($x, CAL_JULIAN));
---EXPECT--
-array(9) {
- ["date"]=>
- string(5) "0/0/0"
- ["month"]=>
- int(0)
- ["day"]=>
- int(0)
- ["year"]=>
- int(0)
- ["dow"]=>
- int(3)
- ["abbrevdayname"]=>
- string(3) "Wed"
- ["dayname"]=>
- string(9) "Wednesday"
- ["abbrevmonth"]=>
- string(0) ""
- ["monthname"]=>
- string(0) ""
-}
-
Copied: php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_1.phpt (from rev 317364, php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_1.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_1.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE != 4) {
+ die("skip this test is for 32bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 882858043;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(5)
+ ["abbrevdayname"]=>
+ string(3) "Fri"
+ ["dayname"]=>
+ string(6) "Friday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
Copied: php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_2.phpt (from rev 317364, php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_2.phpt (rev 0)
+++ php/php-src/branches/PHP_5_3/ext/calendar/tests/bug53574_2.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE == 4) {
+ die("skip this test is for 64bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 3315881921229094912;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(3)
+ ["abbrevdayname"]=>
+ string(3) "Wed"
+ ["dayname"]=>
+ string(9) "Wednesday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
Deleted: php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt
===================================================================
--- php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt 2011-09-27 00:42:56 UTC (rev 317365)
+++ php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -1,35 +0,0 @@
---TEST--
-Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
---SKIPIF--
-<?php include 'skipif.inc'; ?>
---FILE--
-<?php
-if (PHP_INT_MAX == 0x7FFFFFFF) {
- $x = 882858043;
-} else {
- $x = 3315881921229094912;
-}
-
-var_dump(cal_from_jd($x, CAL_JULIAN));
---EXPECT--
-array(9) {
- ["date"]=>
- string(5) "0/0/0"
- ["month"]=>
- int(0)
- ["day"]=>
- int(0)
- ["year"]=>
- int(0)
- ["dow"]=>
- int(3)
- ["abbrevdayname"]=>
- string(3) "Wed"
- ["dayname"]=>
- string(9) "Wednesday"
- ["abbrevmonth"]=>
- string(0) ""
- ["monthname"]=>
- string(0) ""
-}
-
Copied: php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_1.phpt (from rev 317364, php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_1.phpt (rev 0)
+++ php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_1.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE != 4) {
+ die("skip this test is for 32bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 882858043;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(5)
+ ["abbrevdayname"]=>
+ string(3) "Fri"
+ ["dayname"]=>
+ string(6) "Friday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
Copied: php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_2.phpt (from rev 317364, php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_2.phpt (rev 0)
+++ php/php-src/branches/PHP_5_4/ext/calendar/tests/bug53574_2.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE == 4) {
+ die("skip this test is for 64bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 3315881921229094912;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(3)
+ ["abbrevdayname"]=>
+ string(3) "Wed"
+ ["dayname"]=>
+ string(9) "Wednesday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
Deleted: php/php-src/trunk/ext/calendar/tests/bug53574.phpt
===================================================================
--- php/php-src/trunk/ext/calendar/tests/bug53574.phpt 2011-09-27 00:42:56 UTC (rev 317365)
+++ php/php-src/trunk/ext/calendar/tests/bug53574.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -1,35 +0,0 @@
---TEST--
-Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
---SKIPIF--
-<?php include 'skipif.inc'; ?>
---FILE--
-<?php
-if (PHP_INT_MAX == 0x7FFFFFFF) {
- $x = 882858043;
-} else {
- $x = 3315881921229094912;
-}
-
-var_dump(cal_from_jd($x, CAL_JULIAN));
---EXPECT--
-array(9) {
- ["date"]=>
- string(5) "0/0/0"
- ["month"]=>
- int(0)
- ["day"]=>
- int(0)
- ["year"]=>
- int(0)
- ["dow"]=>
- int(3)
- ["abbrevdayname"]=>
- string(3) "Wed"
- ["dayname"]=>
- string(9) "Wednesday"
- ["abbrevmonth"]=>
- string(0) ""
- ["monthname"]=>
- string(0) ""
-}
-
Copied: php/php-src/trunk/ext/calendar/tests/bug53574_1.phpt (from rev 317364, php/php-src/trunk/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/trunk/ext/calendar/tests/bug53574_1.phpt (rev 0)
+++ php/php-src/trunk/ext/calendar/tests/bug53574_1.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE != 4) {
+ die("skip this test is for 32bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 882858043;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(5)
+ ["abbrevdayname"]=>
+ string(3) "Fri"
+ ["dayname"]=>
+ string(6) "Friday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
Copied: php/php-src/trunk/ext/calendar/tests/bug53574_2.phpt (from rev 317364, php/php-src/trunk/ext/calendar/tests/bug53574.phpt)
===================================================================
--- php/php-src/trunk/ext/calendar/tests/bug53574_2.phpt (rev 0)
+++ php/php-src/trunk/ext/calendar/tests/bug53574_2.phpt 2011-09-27 00:53:41 UTC (rev 317366)
@@ -0,0 +1,36 @@
+--TEST--
+Bug #53574 (Integer overflow in SdnToJulian; leads to segfault)
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE == 4) {
+ die("skip this test is for 64bit platform only");
+}
+?>
+--FILE--
+<?php
+$x = 3315881921229094912;
+
+var_dump(cal_from_jd($x, CAL_JULIAN));
+--EXPECT--
+array(9) {
+ ["date"]=>
+ string(5) "0/0/0"
+ ["month"]=>
+ int(0)
+ ["day"]=>
+ int(0)
+ ["year"]=>
+ int(0)
+ ["dow"]=>
+ int(3)
+ ["abbrevdayname"]=>
+ string(3) "Wed"
+ ["dayname"]=>
+ string(9) "Wednesday"
+ ["abbrevmonth"]=>
+ string(0) ""
+ ["monthname"]=>
+ string(0) ""
+}
+
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php