Commit Graph

868 Commits

Author SHA1 Message Date
Dmitry Stogov
cc12acefcd Use cheaper functions 2017-12-04 13:21:35 +03:00
Dmitry Stogov
ec2dde0c0b Introduced zend_hash_find_ex() that may avoid unnecessary hash value check. 2017-11-24 14:01:19 +03:00
Dmitry Stogov
fcc08ce19f Prevent reference-counting on persistent zvals (internal constants, default properties and constants of internal classes).
New macro ZVAL_COPY_OR_DUP() is used perform duplication, if necessary.
This should eliminate related race-coditions in ZTS build and prevent reference-counting bugs after unclean shutdown.
2017-10-30 23:13:10 +03:00
Dmitry Stogov
fad75a54d4 Merge branch 'master' into rc_debug
* master: (26 commits)
  Better fix for bug #75451 (Assertion fails while foreach on empty xpath query)
  Catch with the latest AppVeyor unzip errors
  Fixed type inference
  Fix bug #75453 Incorrect reflection on ibase_connect and ibase_pconnect
  Fix compiler warnings
  We don't use a specific model for a MAKERNOTE so remove these checks that doesn't do anything anyway
  Remove these old comments, as for the TODO, there is already a FR for this
  Re-enable AppVeyor cache
  make sure run-tests reports exit status upon prerequisite error
  Remove implicit constants from test case
  Fix invalid read in zend_use_undefined_constant()
  Fix invalid read in mb_ord()
  Remove --with-libmbfl configure option
  Fixed bug #75451 (Assertion fails while foreach on empty xpath query)
  Add tests for UConverter::getStandards()
  convert spaces to tabs in ext/ftp/tests/server.inc
  Add tests for ftp_rename
  Fix bug #75434 Wrong reflection for mysqli_fetch_all function
  Don't optimize input arrays with suffix holes
  Fix bug #75307 Wrong reflection for openssl_open function
  ...
2017-10-30 12:11:35 +03:00
Nikita Popov
10900a89ad Fix invalid read in zend_use_undefined_constant() 2017-10-28 16:55:23 +02:00
Dmitry Stogov
8203a0668d Merge branch 'master' into rc_debug
* master:
  Use per-request heap instead of system one
  Extend zend_register_class_alias_ex() with additional argument to allow creating persistent or per-request aliases
  Makrk persistent resources and references with GC_PERSISTENT flag
2017-10-27 14:59:09 +03:00
Dmitry Stogov
cf67a421e9 Use per-request heap instead of system one 2017-10-27 14:45:54 +03:00
Dmitry Stogov
49ea143bbd Encapsulate reference-counting primitives.
Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead.
Added mactros to validate reference-counting (disabled for now).
These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
2017-10-27 01:28:58 +03:00
Dmitry Stogov
1ab0d820da Reverted constant related change (this should be handled togrther with ohter constant related places) 2017-10-26 22:43:45 +03:00
Dmitry Stogov
aeca761856 Removed useless reallocations 2017-10-26 19:13:53 +03:00
Dmitry Stogov
ef5ea48741 Always use IS_CONSTANT_AST (IS_CONSTANT is removed). 2017-10-10 10:11:05 +03:00
Dmitry Stogov
fcccb0d6ea Use zval_ptr_dtor_nogc() in places where circular zvals are not possible 2017-10-09 12:24:11 +03:00
Dmitry Stogov
44e0b79ac6 Refactored array creation API. array_init() and array_init_size() are converted into macros calling zend_new_array(). They are not functions anymore and don't return any values. 2017-09-20 02:25:56 +03:00
Dmitry Stogov
43e283fd64 Value of EG(user_exception_handler) should't relive request boundary 2017-07-12 15:37:12 +03:00
Nikita Popov
8126599670 Drop dead abstract method check from zend_call_function()
zend_is_callable() is responsible for doing these kinds of checks
already.

Aldro drop a piece of obsolete commented out code.
2017-07-04 21:11:22 +02:00
Anatol Belski
bc5811f361 further sync for vim mode lines 2017-07-04 18:12:45 +02:00
Dmitry Stogov
bbb786c85b Split zend_init_execute_data() into zend_init_func_execute_data() and zend_init_code_execute_data() 2017-06-29 10:10:57 +03:00
Dmitry Stogov
c0be77aa75 Removed deprecated checks. 2017-06-27 13:12:09 +03:00
Dmitry Stogov
caaeb4849a Removed EG(valid_symbol_table). Used EG(active) instead. 2017-06-26 13:35:07 +03:00
Tom Van Looy
04fb3f28ff Remove superfluous semicolons 2017-06-26 00:23:25 +02:00
Nikita Popov
035a27cbc6 Only compute callback name in error cases
Mostly the callback name is only used to report an error. Try to
avoid calculating it if no error occurred.
2017-06-25 18:45:59 +02:00
Dmitry Stogov
866d3b40e9 Reseet EG(active) a bit early. 2017-06-23 14:58:19 +03:00
Dmitry Stogov
f25ecdacf8 shutdown_executor() refactoring (reuse opcache fast request shutdown code) 2017-06-22 01:45:28 +03:00
Dmitry Stogov
06e41cadd9 We don't need any special handling for CG(unclean_shutdown) at this point, because in case of exit() or die() all destructors must be already called before. 2017-06-21 16:11:50 +03:00
Markus Staab
2fd94e6be7
Removed always true condition
Since 5a9d8a00b4 this can no longer be false
2017-05-11 06:28:08 +01:00
Dmitry Stogov
5a9d8a00b4 Constant class names are already verifyed by PHP compiler. 2017-05-10 14:26:44 +03:00
Xinchen Hui
5340587c25 Merge branch 'PHP-7.1'
* PHP-7.1:
  Update NEWS
  Fixed bug #74408 (Endless loop bypassing execution time limit)
2017-04-11 18:47:06 +08:00
Xinchen Hui
87e6e1982b Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed bug #74408 (Endless loop bypassing execution time limit)
2017-04-11 18:46:41 +08:00
Xinchen Hui
eb03f16442 Fixed bug #74408 (Endless loop bypassing execution time limit) 2017-04-11 18:46:16 +08:00
Rowan Collins
1b565f1393 Change 'undefined constant' from E_NOTICE to E_WARNING and mention deprecation
Implements RFC "Deprecate and Remove Bareword (Unquoted) Strings"
[https://wiki.php.net/rfc/deprecate-bareword-strings]
2017-03-23 18:52:43 +01:00
Anatol Belski
c698299550 Interned strings unification for TS/NTS
Hereby, interned strings are supported in thread safe PHP. The patch
implements two types of interned strings

- interning per process, strings are not freed till process end
- interning per request, strings are freed at request end

There is no runtime interning.

With Opcache, all the permanent iterned strings are copied into SHM on
startup, additional copying into SHM might happen on demand.
2017-03-04 10:39:13 +01:00
Xinchen Hui
fa6144b077 Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg)
  Fixed typo (it should be typo)
2017-02-25 12:00:57 +08:00
Xinchen Hui
36fcc4cb5d Fixed bug #74164 (PHP hangs when an invalid value is dynamically passed to typehinted by-ref arg) 2017-02-25 12:00:42 +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
Nikita Popov
06a0340162 Deprecate each() 2017-02-03 21:02:52 +01:00
Joe Watkins
306f55bef4
Merge branch 'PHP-7.1'
* PHP-7.1:
  Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug
2017-01-26 09:05:10 +00:00
Joe Watkins
2d339fa4d1
Merge branch 'PHP-7.0' into PHP-7.1
* PHP-7.0:
  Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug
2017-01-26 09:04:25 +00:00
andrewnester
f65ae82c55
Fixed #73973 - debug_zval_dump() assertion error for resource consts with --enable-debug 2017-01-26 09:03:47 +00:00
Sammy Kaye Powers
dac6c639bb Update copyright headers to 2017 2017-01-04 11:23:42 -06:00
Sammy Kaye Powers
478f119ab9 Update copyright headers to 2017 2017-01-04 11:14:55 -06:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06: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
Dmitry Stogov
3e9bb03a62 Removed IS_TYPE_IMMUTABLE (it's the same as COPYABLE & !REFCOUED) 2016-11-28 22:59:57 +03:00
Anatol Belski
b204b3abd1 further normalizations, uint vs uint32_t
fix merge mistake

yet one more replacement run
2016-11-26 17:29:01 +01:00
Nikita Popov
d512f21930 Merge branch 'PHP-7.1' 2016-11-20 19:10:29 +01:00
Nikita Popov
c58378619b Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 19:10:03 +01:00
Nikita Popov
ff5a65d26b Revert "Remove a few unused write warning (backport from master, oops)s"
This reverts commit c65d24eaa3.
2016-11-20 19:09:05 +01:00
Bob Weinand
b7fee22e73 Merge branch 'PHP-7.0' into PHP-7.1 2016-11-20 14:18:54 +01:00
Bob Weinand
c65d24eaa3 Remove a few unused write warning (backport from master, oops)s 2016-11-20 14:17:14 +01:00