Commit graph

12767 commits

Author SHA1 Message Date
Xinchen Hui
41bd2087ea Merge branch 'PHP-7.1'
* PHP-7.1:
  Make it slower
2017-02-15 15:27:33 +08:00
Xinchen Hui
8d94d5d942 Make it slower 2017-02-15 15:27:21 +08:00
Xinchen Hui
49dca87029 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed test
2017-02-15 14:49:09 +08:00
Xinchen Hui
dad5281a89 Fixed test 2017-02-15 14:49:02 +08:00
Xinchen Hui
bf91fc565c Merge branch 'PHP-7.1'
* PHP-7.1:
  Add a test for hard_timeout(bug #74093)
2017-02-15 13:52:08 +08:00
Xinchen Hui
6767ef05a5 Add a test for hard_timeout(bug #74093) 2017-02-15 13:51:45 +08:00
Xinchen Hui
e33afaa299 Merge branch 'PHP-7.1'
* PHP-7.1:
  Workaround to fix bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
2017-02-15 12:30:23 +08:00
Xinchen Hui
1242f53ddb Workaround to fix bug #74093 (Maximum execution time of n+2 seconds exceed not written in error_log)
Use a different exit code for hard_timeout, 124 is used by linux
timeout:http://man7.org/linux/man-pages/man1/timeout.1.html
"If the command times out, and --preserve-status is not set, then exit with status 124"
2017-02-15 12:27:56 +08:00
Xinchen Hui
00e5ea7b76 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug  #73989 (PHP 7.1 Segfaults within Symfony test suite)

Conflicts:
	Zend/zend_gc.c
2017-02-13 19:24:00 +08:00
Xinchen Hui
9df7cc3e68 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug  #73989 (PHP 7.1 Segfaults within Symfony test suite)
2017-02-13 19:17:09 +08:00
Xinchen Hui
3917350531 Fixed bug #73989 (PHP 7.1 Segfaults within Symfony test suite) 2017-02-13 19:16:17 +08:00
Xinchen Hui
963981df58 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #74084 (Out of bound read - zend_mm_alloc_small)
2017-02-12 20:36:43 +08:00
Xinchen Hui
b56114e8fb Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74084 (Out of bound read - zend_mm_alloc_small)

Conflicts:
	Zend/zend_operators.c
2017-02-12 20:36:18 +08:00
Xinchen Hui
26fdebc63b Fixed bug #74084 (Out of bound read - zend_mm_alloc_small) 2017-02-12 20:34:08 +08:00
Xinchen Hui
cad92c1243 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed typo
2017-02-11 00:02:07 +08:00
Xinchen Hui
808a11041d Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed typo
2017-02-11 00:01:38 +08:00
Xinchen Hui
db7c0badd4 Fixed typo 2017-02-11 00:01:09 +08:00
Dmitry Stogov
c39147d136 Fixed bug #74053 (Corrupted class entries on shutdown when a destructor spawns another object). (jim at commercebyte dot com)
Merge branch 'master' of github.com:commercebyte/php-src

* 'master' of github.com:commercebyte/php-src:
  Added EG(flags) - executor global flags EG_FLAGS_IN_SHUTDOWN - is set when PHP is in shutdown state
  newly added zend_object_store.no_reuse is redefined as a global zend_object_store_no_reuse, to avoid alignment issues
  Alignment fix, as per @nikic
  The test scripts bug64720.phpt and bug68652.phpt were relying on the buggy behavior, when PHP returns "Undefined static property" error due to class entry corruption. With my fix for bug 74053, both tests return no errors now, I corrected the EXPECTF accordingly
  Bug Fix: Corrupted class entries on shutdown when a destructor spawns another object (C) 2017 CommerceByte Consulting
2017-02-10 10:31:43 +03:00
Jim Zubov
1b1399c95d Added EG(flags) - executor global flags
EG_FLAGS_IN_SHUTDOWN - is set when PHP is in shutdown state
2017-02-09 12:40:33 -05:00
Jim Zubov
f9afc6aabc newly added zend_object_store.no_reuse is redefined as a global zend_object_store_no_reuse,
to avoid alignment issues
2017-02-07 21:13:39 -05:00
Nikita Popov
33adee5391 Merge branch 'PHP-7.1' 2017-02-08 01:00:52 +01:00
Nikita Popov
8417a3be38 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-08 01:00:46 +01:00
dreamsxin
7a0adb4cd2 Add #ifndef restrict 2017-02-08 01:00:35 +01:00
Nikita Popov
1b40313804 Merge branch 'PHP-7.1' 2017-02-08 00:54:27 +01:00
Nikita Popov
bb9adc4c52 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-08 00:53:36 +01:00
Christian Schmidt
714d825b62 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-08 00:53:18 +01:00
Jim Zubov
a6acffe421 Alignment fix, as per @nikic 2017-02-07 10:51:09 -05:00
Jim Zubov
d94b067504 The test scripts bug64720.phpt and bug68652.phpt were relying on the buggy behavior,
when PHP returns "Undefined static property" error due to class entry corruption.
With my fix for bug 74053, both tests return no errors now, I corrected the EXPECTF accordingly

[Anybody please advice if I'm wrong?]

Also created bug74053.phpt, for the code I mentioned in the bug description
2017-02-07 09:19:16 -05:00
Anatol Belski
a7269c09d2 Merge branch 'PHP-7.1'
* PHP-7.1:
  use some dynamically generated NAN as well
2017-02-07 13:19:50 +01:00
Anatol Belski
189ea77101 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  use some dynamically generated NAN as well
2017-02-07 13:18:38 +01:00
Anatol Belski
044dd30440 use some dynamically generated NAN as well 2017-02-07 13:16:30 +01:00
Anatol Belski
7e440f2209 rework fd521a22 to simplify for master, see github #2356 2017-02-07 12:40:10 +01:00
Anatol Belski
623478a2d6 Merge branch 'PHP-7.1'
* PHP-7.1:
  switch to smart str conversion routine to hide exact NAN type
2017-02-07 12:04:25 +01:00
Anatol Belski
265c53dbbf Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  switch to smart str conversion routine to hide exact NAN type
2017-02-07 12:03:21 +01:00
Anatol Belski
fd521a22f7 switch to smart str conversion routine to hide exact NAN type
see https://github.com/php/php-src/pull/2356#issuecomment-277564135
2017-02-07 12:01:14 +01:00
Jim Zubov
9a8a1c9da1 Bug Fix:
Corrupted class entries on shutdown when a destructor spawns another object
(C) 2017 CommerceByte Consulting

When zend_objects_store_call_destructors() is called from the shutdown sequence -
it's calling the dtor's for remaining objects one by one in sequence of object handles.
If the dtor spawns one or more objects, and the new objects happen to reuse the old handles -
their dtor's are not called in this cycle.
The dtor's are called later on, when zend_deactivete() kicks in, and the static property lists in the class entries are freed.
This causes "Undefined static property" errors, and/or SIGSEGV.

Solution:
zend_object_store.no_reuse field is added
Set to 0 on initialization, set to 1 on the shutdown sequence.
zend_objects_store_put(zend_object *) checks the no_reuse flag, and never reuses the old handle slots if set.
This way, the dtor's for newly spawned objects are guaranteed to be called in the zend_objects_store_call_destructors() loop.
2017-02-06 18:05:34 -05:00
Nikita Popov
31332d0941 Merge branch 'PHP-7.1' 2017-02-06 01:47:09 +01:00
Nikita Popov
546af1966e Merge branch 'PHP-7.0' into PHP-7.1 2017-02-06 01:46:01 +01:00
Nikita Popov
8a8aa67844 Revert "Fix detection of isnan and isinf"
This reverts commit 9ea0949f43.
2017-02-06 01:45:53 +01:00
Nikita Popov
b73190d919 Merge branch 'PHP-7.1' 2017-02-05 18:13:24 +01:00
Nikita Popov
70b27b5ad8 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-05 18:10:04 +01:00
Christian Schmidt
9ea0949f43 Fix detection of isnan and isinf
The isnan() and isinf() are C99 macros not functions.

Also fix is_infinite(-INF) in case isinf is not defined.
2017-02-05 18:09:04 +01:00
Andrea Faulds
07d1cd3bc3 Merge branch 'PHP-7.1' 2017-02-05 01:34:15 +00:00
Andrea Faulds
b87e399393 Merge branch 'PHP-7.0' into PHP-7.1 2017-02-05 01:31:42 +00:00
Andrea Faulds
21d7878690 Fix bug #73954 2017-02-05 01:30:20 +00:00
Niklas Keller
2edc3cf8d2 Implement Parameter Type Widening RFC 2017-02-04 23:33:24 +01:00
Nikita Popov
06a0340162 Deprecate each() 2017-02-03 21:02:52 +01:00
Nikita Popov
6ba7206620 Deprecate assert() with string argument 2017-02-03 21:02:52 +01:00
Nikita Popov
c61daf415d Deprecate track_errors / $php_errormsg 2017-02-03 21:02:52 +01:00
Nikita Popov
2df9346e7f Deprecate mb_parse_str() without second argument 2017-02-03 18:52:57 +01:00