summaryrefslogtreecommitdiff
path: root/ext/calendar/tests/jdtojewish64.phpt
diff options
context:
space:
mode:
Diffstat (limited to 'ext/calendar/tests/jdtojewish64.phpt')
-rw-r--r--ext/calendar/tests/jdtojewish64.phpt18
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/calendar/tests/jdtojewish64.phpt b/ext/calendar/tests/jdtojewish64.phpt
new file mode 100644
index 0000000000..50f7f33c7b
--- /dev/null
+++ b/ext/calendar/tests/jdtojewish64.phpt
@@ -0,0 +1,18 @@
+--TEST--
+Integer overflow in SndToJewish leads to php hang
+--SKIPIF--
+<?php
+include 'skipif.inc';
+if (PHP_INT_SIZE == 4) {
+ die("skip this test is for 64bit platform only");
+}
+?>
+--FILE--
+<?php
+$a = array(38245310, 38245311, 9223372036854743639);
+
+foreach ($a as $x) var_dump(jdtojewish($x));
+--EXPECTF--
+string(11) "2/22/103759"
+string(5) "0/0/0"
+string(5) "0/0/0"