Commit graph

12767 commits

Author SHA1 Message Date
Nikita Popov
abb91ee9ea Move smart_string to Zend
smart_str is already in Zend.
2017-01-01 21:28:20 +01:00
Sara Golemon
52db03b3e5 Support ZEND_PARSE_PARAMS_THROW in new ZPP API 2016-12-29 18:26:19 -08:00
Nikita Popov
d719ac929e Merge branch 'PHP-7.1' 2016-12-29 21:41:28 +01:00
Nikita Popov
12922f2a58 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-29 21:41:21 +01:00
Nikita Popov
432660f73f Another try at making concat_003 more reliable
Use array_fill() for the array population loop -- this isn't the
part that is being tested and on PHP 7.0 w/o opcache this duplicates
the inner array a lot.
2016-12-29 21:39:40 +01:00
Nikita Popov
270f1ffd19 Merge branch 'PHP-7.1' 2016-12-29 21:18:58 +01:00
David Walker
b09c2f899e Fixed bug #73783
Bug #73783 raises an issue with signal handling when using SIG_IGN.
With PHP7.1 ZEND_SIGNALS is defaulted to on, which will for all
signals set the handler as zend_signal_handler_defer.  This is
problematic for syscalls like sleep(), which will only return when the
requisite number of seconds have elapsed, or, a non-ignored signal is
raised.  In this case we want to SIG_IGN SIGCHLD, however, SIG_IGN is
only stored in the SIGG(handlers) array, and the actual system level
handler is defined.  This prevents proper signal ignoring when requeted.
2016-12-29 21:18:22 +01:00
Sara Golemon
16758a3c66 Merge branch 'PHP-7.1'
* PHP-7.1:
  Remove extraneous parentheses in conditions
2016-12-25 22:18:27 -08:00
Sébastien Santoro
5d7c774bea Remove extraneous parentheses in conditions
The zend_vm_gen.php generator now checks if the condition is already
enclosed by parentheses, and them only if needed.

This fixes nine clang/llvm parentheses-equality warnings.
2016-12-25 22:17:46 -08:00
Anatol Belski
758af77e9d Path handling related refactorings
Primarily related to the path handling datatypes, to avoid unnecessary
casts, where possible. Also some rework to avoid code dup. Probably
more places are to go, even not path related, primarily to have less
casts and unsigned integers where possible. That way, we've not only
less warnings and casts, but are also safer with regard to the
integer overflows. OFC it's not a panacea, but still significantly
reduces the vulnerability potential.
2016-12-22 14:56:47 +01:00
Anatol Belski
837cce3b0b move the defs to the right place 2016-12-22 02:17:55 +01:00
Nikita Popov
3df43437fe Merge branch 'PHP-7.1' 2016-12-21 22:12:17 +01:00
Nikita Popov
ed0602fe31 Fix string extension in negate_num_string
Forgot to actually assign the reallocated string...
2016-12-21 22:11:17 +01:00
Nikita Popov
114b526649 Merge branch 'PHP-7.1' 2016-12-21 21:28:36 +01:00
Nikita Popov
06699abffb Merge branch 'PHP-7.0' into PHP-7.1 2016-12-21 21:28:29 +01:00
Nikita Popov
c41826d1e6 Increase timing quota for small string concat test
Test is regularly failing on Travis.
2016-12-21 21:27:47 +01:00
Nikita Popov
a1fd1053f5 Merge branch 'PHP-7.1' 2016-12-21 21:19:28 +01:00
Nikita Popov
9afc61c214 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-21 21:19:10 +01:00
David Walker
5733fd1caf Fix #73753 - Unpacked Arrays and Duplication 2016-12-21 21:18:20 +01:00
Xinchen Hui
b6553d422d Merge branch 'PHP-7.1'
* PHP-7.1:
  Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)
2016-12-21 14:27:13 +08:00
Xinchen Hui
82988d3e41 Revert "Reorder the oplines" (Break Zend/tests/return_types/bug71092.phpt)
This reverts commit a12f43ee2c.
2016-12-21 14:24:14 +08:00
Dmitry Stogov
088dd88eeb Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #73792 (invalid foreach loop hangs script)
  Fixed bug #73789 (Strange behavior of class constants in switch/case block)
2016-12-20 16:54:28 +03:00
Dmitry Stogov
43cc3d7d92 Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #73792 (invalid foreach loop hangs script)
2016-12-20 16:53:06 +03:00
Dmitry Stogov
3c6a2fb08c Fixed bug #73792 (invalid foreach loop hangs script) 2016-12-20 16:48:57 +03:00
Dmitry Stogov
fb73c1084c Few micro-optimizations 2016-12-19 15:36:37 +03:00
Xinchen Hui
adf0256c4a Merge branch 'PHP-7.1'
* PHP-7.1:
  Reorder the oplines
2016-12-17 20:09:49 +08:00
Xinchen Hui
aa84808e33 Merge branch 'PHP-7.1' of git.php.net:/php-src into PHP-7.1
* 'PHP-7.1' of git.php.net:/php-src:
  add Appveyor fast_fail
  improve error check
  turn mcrypt back on for Appveyor runs
  add build status badge
  add scripts for AppVeyor integration
  Silence warning from unhandled enum
  fix leaking streams and memory mapped files
  turn mcrypt back on for Appveyor runs
  add build status badge
  add scripts for AppVeyor integration
  Silence warning from unhandled enum
  fix leaking streams and memory mapped files
  Fix stack management in ini scanner
  chance CLI codepage, only when SAPI is initialized
2016-12-17 20:09:34 +08:00
Xinchen Hui
a12f43ee2c Reorder the oplines
1. we should only do the return type checking when it is really about to
return
2. for 029.php, actually, the exception threw should be discard while it
jmp into finally(it could be observed by change the return to return an array)
3. after this fix, the test 029.phpt behavior consistently with 7.0
4. good for optimizer too
2016-12-17 20:06:18 +08:00
Nikita Popov
edf3cde0d3 Merge branch 'PHP-7.1' 2016-12-16 20:56:09 +01:00
Nikita Popov
a32829f909 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-16 20:55:08 +01:00
Nikita Popov
fa92a16e46 Fix stack management in ini scanner 2016-12-16 20:54:46 +01:00
Nikita Popov
ef1ed6ab8e Merge branch 'PHP-7.1' 2016-12-14 18:11:51 +01:00
Nikita Popov
33e96c9d63 Merge branch 'PHP-7.0' into PHP-7.1 2016-12-14 18:11:43 +01:00
Nikita Popov
f99bf70360 Partially fix bug #70492
The libmagic portion is missing.
2016-12-14 18:11:27 +01:00
Nikita Popov
61e7e7c5bd Merge branch 'PHP-7.1' 2016-12-14 17:57:21 +01:00
Nikita Popov
2f438342ec Fixed bug #73727
Error introduced when refactoring zend_alloc code into zend_bitset.
2016-12-14 17:56:31 +01:00
Remi Collet
4c6ea7d464 Minor fix macro value
[] results in /**/ which can break some test
e.g. d9ba7726f7
2016-12-12 16:27:37 +01:00
Dmitry Stogov
6689704403 Increased number of reserved resources (from 4 to 6) 2016-12-12 11:51:12 +03:00
Dmitry Stogov
2d52d78741 Fixed compilation error 2016-12-12 11:19:04 +03:00
Dmitry Stogov
fac95658b3 Improved VM stack unwinding on exception.
Now zend_throw_exception_hook() is going to be called only when exception is actually thrown and not going to be recalled for each unwinded finction.
2016-12-12 10:55:32 +03:00
Nikita Popov
fe98ff94bb Merge branch 'PHP-7.1' 2016-12-11 13:34:28 +01:00
Nikita Popov
2c70581338 Fix T_NUM_STRING negation
T_NUM_STRING follows the rules of symtable numeric string
conversion. If the offset isn't an integer under those rules, it
is treated as a string. This should apply to negated T_NUM_STRINGs
as well.
2016-12-11 13:33:25 +01:00
Xinchen Hui
7695fba388 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fix the bug in ZEND_ASSIGN_DIM (as nikic suggest)
  Revert "Refix bug #73686"
2016-12-09 22:30:41 +08:00
Xinchen Hui
09b36113b0 Fix the bug in ZEND_ASSIGN_DIM (as nikic suggest) 2016-12-09 22:30:24 +08:00
Xinchen Hui
6812721ef2 Revert "Refix bug #73686"
This reverts commit 4589386026.
2016-12-09 22:22:59 +08:00
Xinchen Hui
95f41f21e1 Merge branch 'PHP-7.1'
* PHP-7.1:
  Refix bug #73686
2016-12-09 16:43:45 +08:00
Xinchen Hui
4589386026 Refix bug #73686 2016-12-09 16:37:22 +08:00
Dmitry Stogov
a3526cd9b7 Regenerated zend_vm_execute.h (fixed white spaces) 2016-12-08 13:37:57 +03:00
Kalle Sommer Nielsen
cf24a61735 Disable C4101 warnings entirely on Windows 2016-12-08 03:50:31 +01:00
Dmitry Stogov
000d4a1a1b Merge branch 'PHP-7.1'
* PHP-7.1:
  Check if PHP is in execution state.
2016-12-07 15:13:00 +03:00