Commit Graph

904 Commits

Author SHA1 Message Date
Dmitry Stogov
f6d227ed4f Implemented preloading RFC: https://wiki.php.net/rfc/preload.
Squashed commit of the following:

commit 106c815fffb8eb3efe00a27a5229cb1f8ffc9736
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 14 16:36:44 2018 +0300

    Added NEWS entry

commit 1dacd5e20b7043368ef9e80db296d1781134b6fd
Merge: d516139abf ba99aa133c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 14 16:33:37 2018 +0300

    Merge branch 'master' into preload

    * master:
      Fixed issues related to optimization and persitence of classes linked with interfaces, traits or internal classes.
      Added possiblity to avoid signal handlers reinitialization on each request.

commit d516139abf5ffbd495ee6037f1dc04a1cfe588a7
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 14 16:13:15 2018 +0300

    Override opcache.preload for testing

commit 162b154d0bbfbaf8ef93975f7e56a1353236903d
Merge: 45fdd034ce 8bda22592e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 14 15:38:09 2018 +0300

    Merge branch 'master' into preload

    * master: (34 commits)
      Eliminate useless $this related check
      Eliminate useless $this related checks
      Replace zend_parse_method_parameters() by zend_parse_parameters() and avoid useless checks.
      Replace getThis() by EX(This), when additional check is not necessary.
      Fixed tests
      Validate length on socket_write
      Fix compilation on x32
      Fix #77141: Signedness issue in SOAP when precision=-1
      Support SQLite3 @name notation
      Remove lexer files generated by RE2C
      Update libmagic.patch [ci skip]
      Update libmagic.patch [ci skip]
      Fork test with pcre.jit=0
      Rework magic data
      Fix regex
      Fix regex
      Rework magic data
      Sync one more upstream libmagic piece
      Suppress already used warning
      Ignore getaddrinfo failed message
      ...

commit 45fdd034ce
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 9 13:07:03 2018 +0300

    Properly resolve magic method of preloaded classes inherited from internal ones.

commit 34645aeb42
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 8 15:29:17 2018 +0300

    Don't preload constants defined during preload script excution.

commit cef0d67c3e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 7 15:56:54 2018 +0300

    Support for class aliasses

commit 08ffc9a552
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Nov 7 15:34:39 2018 +0300

    Resolve constants only in linked classes

commit 8d3429cda8
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Nov 6 11:56:39 2018 +0300

    Fixed preloading of references to internal classes.

commit 7ae3a47d20
Merge: 9b0a53ed1c 049f239cfc
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Nov 6 11:37:15 2018 +0300

    Merge branch 'master' into preload

    * master:
      Update NEWS [ci skip]
      Update NEWS [ci skip]
      Update libmagic.patch [ci skip]
      Update libmagic.patch [ci skip]
      Declare function proto in header
      Declare function proto in header
      Fix #76825: Undefined symbols ___cpuid_count
      NEWS
      Fix: #77110 undefined symbol zend_string_equal_val in C++ build
      Fix #77105: Use position:sticky for <th> in `phpinfo()`
      Implement handling for JIT recognition when cross compiling
      Backport 7f5f4601 for 7.2
      Fix #76348: WSDL_CACHE_MEMORY causes Segmentation fault
      Rework places in libmagic regarding previous CVE-2014-3538 fixes
      Change the way JIT availability is checked
      Fix a test for ldap extension
      Fixed bug #77092
      Future-proof email addresses

commit 9b0a53ed1c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 2 14:54:44 2018 +0300

    We don't need preload_restart() here

commit 0bd17bd438
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 2 14:44:30 2018 +0300

    EG(*) may be not initializd at this point - use CG(*).

commit b610467051
Merge: 3a9d90f74a 67e0138c0d
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Nov 2 11:33:37 2018 +0300

    Merge branch 'master' into preload

    * master:
      Future-proof email addresses...
      Update email addresses.  We're still @Zend, but future proofing it...

commit 3a9d90f74a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 1 15:19:48 2018 +0300

    Fexed resolution of method clones

commit aea85c65bd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 1 11:45:50 2018 +0300

    Prevent inlining of method copied from trait

commit 36b644fbb7
Merge: 7a20781d2e b91690c892
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Nov 1 10:56:02 2018 +0300

    Merge branch 'master' into preload

    * master:
      Fix stray newline that caused this test to fail
      Fix session tests that fail if error_log is set
      This test needs to log to stdout
      Fix error condition
      Fixed bug #77081 ftruncate() changes seek pointer in c mode
      Fix and improve test case

commit 7a20781d2e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 31 00:52:46 2018 +0300

    Added test

commit 4a57b5d563
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 31 00:50:21 2018 +0300

    Fixed preloading of classes linked with traits

commit 68c4f99e23
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 30 16:25:14 2018 +0300

    Added test

commit 38ab7ef4cf
Merge: eb6e2c529f bf38e6c10a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 30 16:14:39 2018 +0300

    Merge branch 'master' into preload

    * master:
      Keep original value of "prototype"

commit eb6e2c529f
Merge: 562049510f 2fefa8c61e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 30 15:35:39 2018 +0300

    Merge branch 'master' into preload

    * master:
      Call function_add_ref() in proper place
      Updated to version 2018.7 (2018g)
      Updated to version 2018.7 (2018g)
      Updated to version 2018.7 (2018g)
      Reslove inherited op_array references once afrer all optimizations.

commit 562049510f
Merge: e806cb732a 4828fb7b6b
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 30 10:29:49 2018 +0300

    Merge branch 'master' into preload

    * master:
      [ci skip] Update NEWS
      [ci skip] Update NEWS
      [ci skip] Update NEWS
      fix bug #77079
      Add missing null initialization
      Remove redundant mbfl_string_init calls
      Use zend_string for mbstring last encoding cache

commit e806cb732a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 22:32:15 2018 +0300

    Fixed double-free

commit 2f697ef8af
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 22:07:32 2018 +0300

    typo

commit c559f22b3e
Merge: 310631cc05 ea2e67876a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 21:59:27 2018 +0300

    Merge branch 'master' into preload

    * master:
      Stop Apache if PHP wasn't started successful.
      Execute zend_post_startup() with module_initialized flag set.
      Removed dead code
      Fix mb_strrpos() with encoding passed as 3rd param

commit 310631cc05
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 16:48:42 2018 +0300

    Stop Apache if PHP wasn't started successful.

commit 0a24d7ba8f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 16:25:49 2018 +0300

    Avoid use-after-free in main thread

commit 17a3cb4a2a
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 15:25:17 2018 +0300

    Execute zend_post_startup() with module_initialized flag set.

commit 6d4b22c518
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 14:12:20 2018 +0300

    Override SAPI.ub_write and SAPI.flush for preloading

commit 386c9d3470
Merge: d7fbb4d402 359f19edc9
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 29 13:49:24 2018 +0300

    Merge branch 'master' into preload

    * master:
      Optimize substr() edge-case conditions
      [ci skip] Update UPGRADING
      Fix #71592: External entity processing never fails
      Add TIDY_TAG_* constants supported by libtidy 5
      Add is_iterable to opcache Optimizer

commit d7fbb4d402
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 26 13:11:54 2018 +0300

    Restore preload state if it was already loaded in another process.

commit 0fe9ea1c07
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 26 12:29:06 2018 +0300

    Removed dead code

commit 3a2d1bcc1f
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 26 00:19:40 2018 +0300

    Support for builds without ZEND_SIGNALS

commit e6b76ecb4b
Merge: 4531fbf931 68694c9997
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 23:43:25 2018 +0300

    Merge branch 'master' into preload

    * master:
      Don't wrap php_module_shutdown() with zend_try. executor_globals are released in ZTS build, and this leads to crash.
      [ci skip] Fix indentation in UPGRADING.

commit 4531fbf931
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 22:44:49 2018 +0300

    Disable linking and preloading of classes those parent or one of interface or trait is an internal class.

commit a594a618ce
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 22:30:51 2018 +0300

    Cleanup

    - remove useless ZCSG(saved_map_ptr_last)
    - move preloaded classes/functions clean-up code back into better place

commit ab9a40f63c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 20:52:51 2018 +0300

    Added support for preloaded classes/functions in ZTS build

commit e3c65db099
Merge: 4f57c1e029 33e777acbf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 20:52:26 2018 +0300

    Merge branch 'master' into preload

    * master:
      Improved shared interned strings handling. The previous implementation worked incorrectly in ZTS build. It changed strings only in function/class tables of one thread. Now all threads gets the same shared interned strings. Also, on shutdown, we don't try to replace SHM interned strings back to process strings, but delay dettachment of SHM instead.
      Don't use request heap at shutdown
      Don't optimize function if inference failed
      Fixed bug #77058
      Improve "narrowing" error message
      bump versions

commit 4f57c1e029
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 15:29:58 2018 +0300

    Cleanup (move preload_shutdown() call to better place)

commit 26587a95c0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 14:30:51 2018 +0300

    eol

commit d70cb10480
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 14:30:20 2018 +0300

    cleanup

commit aabe685dbb
Merge: d9fc51bc3b 40808ac41e
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Thu Oct 25 12:42:51 2018 +0300

    Merge branch 'master' into preload

    * master:
      Remove unused var
      Remove ext/json parser files generated by bison
      Fix run-tests.php for running phpdbg and certain test sections
      Normalize .gitignore

commit d9fc51bc3b
Merge: b5ffba0faf b6ef8998d5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 24 15:59:24 2018 +0300

    Merge branch 'master' into preload

    * master:
      Fixed reseting of interned strings buffer.

commit b5ffba0faf
Merge: e4a7ef0c43 a404383118
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 24 12:46:28 2018 +0300

    Merge branch 'master' into preload

    * master:
      Fixed build in directory different from source

commit e4a7ef0c43
Merge: 811f20aaa5 d1e14e2cc0
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 24 11:59:43 2018 +0300

    Merge branch 'master' into preload

    * master: (29 commits)
      Make php_plain_files_wrapper to be writable (workaround for swoole)
      Remove phpdbg parser files generated by bison
      Fix conflicts in phpdbg parser
      Refetetch function name on exceptional path to allow better code on fast code path.
      fix typo in sysvsem.c
      Fixed bug #50675
      bump to 7.2.13-dev
      [ci skip] Update NEWS wrt. php-7.3.0RC4 tagging
      Inlining in the most frequently used code paths
      Fixed test failurs introduced by 9c144e0d82
      Use persistent strings only for persistent connections
      Fix accessibility checks for dynamic properties
      Updated to version 2018.6 (2018f)
      Updated to version 2018.6 (2018f)
      Updated to version 2018.6 (2018f)
      Fix arginfo and clean up fpm_get_status
      Defragment two Zend related Makefile fragments together
      [ci skip] Remove automake and aclocal in comments
      Fix #75282: xmlrpc_encode_request() crashes
      Fix tests for ICU 63.1
      ...

commit 811f20aaa5
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 22 14:10:49 2018 +0300

    Added information about preloading to opcache_get_status()

commit 093e8b1bbf
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 19 13:46:23 2018 +0300

    Added warning message

commit a2ba970ce3
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 19 13:35:40 2018 +0300

    Added test

commit b67e28367c
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 19 13:33:12 2018 +0300

    Don't preload functions declared at run-time.

commit b0139dc228
Merge: a609520adb 3fe698b904
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Fri Oct 19 13:23:14 2018 +0300

    Merge branch 'master' into preload

    * master:
      Mark "top-level" functions.
      Don't initialize static_member_tables during start-up, when inherit internal classes.
      [ci skip] Update NEWS
      [ci skip] Update NEWS
      [ci skip] Update NEWS
      Fix #77035: The phpize and ./configure create redundant .deps file
      Remove outdated PEAR artefacts
      Fix tests/output/bug74815.phpt generating errors.log
      Revert "Use C++ symbols, when C++11 or upper is compiled"
      Use C++ symbols, when C++11 or upper is compiled
      Added new line
      Remove stamp-h
      Move all testing docs to qa.php.net
      Fix a typo in UPGRADING.INTERNALS
      Fix test when it's run on another drive
      [ci skip] Update UPGRADING wrt. tidyp support
      Fixed incorrect reallocation
      Fix #77027: tidy::getOptDoc() not available on Windows
      Run CI tests under opcache.protect_memory=1

commit a609520adb
Merge: ac8f45f61b b6ac50f9e6
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 17:01:05 2018 +0300

    Merge branch 'master' into preload

    * master:
      Fixed comment
      Micro optimizations
      Mark "top-level" classes

commit ac8f45f61b
Merge: 632b30b545 d57cd36e47
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 15:53:41 2018 +0300

    Merge branch 'master' into preload

    * master:
      Immutable clases and op_arrays.

commit 632b30b545
Merge: d33908a99a cd0c36c3f9
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 15:04:43 2018 +0300

    Merge branch 'immutable' into preload

    * immutable:
      Remove the "auto" encoding
      Fixed bug #77025
      Add vtbls for EUC-TW encoding

commit cd0c36c3f9
Merge: 4740dabb84 ad6738e886
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:43:38 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove the "auto" encoding
      Fixed bug #77025
      Add vtbls for EUC-TW encoding

commit d33908a99a
Merge: 21e0bebca3 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:14:23 2018 +0300

    Merge branch 'immutable' into preload

    * immutable:
      Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.

commit 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:12:28 2018 +0300

    Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.

commit 21e0bebca3
Merge: c78277ae84 ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 12:29:59 2018 +0300

    Merge branch 'immutable' into preload

    * immutable:
      Added comment
      Added type cast
      Moved static class members initialization into the proper place.
      Removed redundand assertion
      Removed duplicate code
      Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.
      typo
      Remove unused variable makefile_am_files
      Classify object handlers are required/optional
      Add support for getting SKIP_TAGSTART and SKIP_WHITE options
      Remove some obsolete config_vars.mk occurrences
      Remove bsd_converted from .gitignore
      Remove configuration parser and scanners ignores
      Remove obsolete buildconf.stamp from .gitignore
      [ci skip] Add magicdata.patch exception to .gitignore
      Remove outdated ext/spl/examples items from .gitignore
      Remove unused test.inc in ext/iconv/tests

commit ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:46:30 2018 +0300

    Added comment

commit 0276ea5187
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:42:43 2018 +0300

    Added type cast

commit c63fc5d5f1
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:36:51 2018 +0300

    Moved static class members initialization into the proper place.

commit b945548e93
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:21:03 2018 +0300

    Removed redundand assertion

commit d5a4108840
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:19:13 2018 +0300

    Removed duplicate code

commit 8dadca8864
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:05:43 2018 +0300

    Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.

commit 9ef07c88bd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:48:29 2018 +0300

    typo

commit a06f0f3d3a
Merge: 94099586ec 3412345ffe
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:47:07 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove unused variable makefile_am_files
      Classify object handlers are required/optional
      Add support for getting SKIP_TAGSTART and SKIP_WHITE options
      Remove some obsolete config_vars.mk occurrences
      Remove bsd_converted from .gitignore
      Remove configuration parser and scanners ignores
      Remove obsolete buildconf.stamp from .gitignore
      [ci skip] Add magicdata.patch exception to .gitignore
      Remove outdated ext/spl/examples items from .gitignore
      Remove unused test.inc in ext/iconv/tests

commit c78277ae84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 16 17:25:35 2018 +0300

    Preloadsing support for opcache restart

commit f76a955c02
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Tue Oct 16 13:52:36 2018 +0300

    Fixed incorrect signal handlers overriding

commit 0810ce0d81
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 15 23:38:48 2018 +0300

    An attempt to implemnt "preloading" ability.

commit 94099586ec
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 15 23:34:01 2018 +0300

    Immutable clases and op_arrays
2018-11-14 16:46:05 +03:00
Zeev Suraski
54dc07f3dc Update email addresses. We're still @Zend, but future proofing it... 2018-11-01 17:20:07 +02:00
Dmitry Stogov
d57cd36e47 Immutable clases and op_arrays.
Squashed commit of the following:

commit cd0c36c3f9
Merge: 4740dabb84 ad6738e886
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:43:38 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove the "auto" encoding
      Fixed bug #77025
      Add vtbls for EUC-TW encoding

commit 4740dabb84
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 14:12:28 2018 +0300

    Reverted back ce->iterator_funcs_ptr. Initialize ce->iterator_funcs_ptr fields in immutable classes.

commit ad7a78b253
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:46:30 2018 +0300

    Added comment

commit 0276ea5187
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:42:43 2018 +0300

    Added type cast

commit c63fc5d5f1
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:36:51 2018 +0300

    Moved static class members initialization into the proper place.

commit b945548e93
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:21:03 2018 +0300

    Removed redundand assertion

commit d5a4108840
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:19:13 2018 +0300

    Removed duplicate code

commit 8dadca8864
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 11:05:43 2018 +0300

    Hide offset encoding magic in ZEND_MAP_PTR_IS_OFFSET(), ZEND_MAP_PTR_OFFSET2PTR() and ZEND_MAP_PTR_PTR2OFFSET() macros.

commit 9ef07c88bd
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:48:29 2018 +0300

    typo

commit a06f0f3d3a
Merge: 94099586ec 3412345ffe
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Wed Oct 17 10:47:07 2018 +0300

    Merge branch 'master' into immutable

    * master:
      Remove unused variable makefile_am_files
      Classify object handlers are required/optional
      Add support for getting SKIP_TAGSTART and SKIP_WHITE options
      Remove some obsolete config_vars.mk occurrences
      Remove bsd_converted from .gitignore
      Remove configuration parser and scanners ignores
      Remove obsolete buildconf.stamp from .gitignore
      [ci skip] Add magicdata.patch exception to .gitignore
      Remove outdated ext/spl/examples items from .gitignore
      Remove unused test.inc in ext/iconv/tests

commit 94099586ec
Author: Dmitry Stogov <dmitry@zend.com>
Date:   Mon Oct 15 23:34:01 2018 +0300

    Immutable clases and op_arrays
2018-10-17 15:52:50 +03:00
Dmitry Stogov
a2e8334613 Allocate only necessary space for static properties of internal classes in ZTS mode. 2018-10-01 19:05:31 +03:00
Nikita Popov
a7b8131606 Drop unused variable 2018-09-18 12:12:36 +02:00
Dmitry Stogov
62338a2385 Use different loop terminating conditions 2018-09-17 20:39:28 +03:00
Nikita Popov
178dcd4749 Perform final GC before the object store is freed
free_object_storage intentionally does not free the object allocations
to make sure that they show up as leaks. However, if the object is in
the GC root buffer, the later GC run may end up freeing the allocation,
hiding the leak.

Avoid this by moving the final GC run before free_object_storage, the
way it was done before fast_shutdown was integrated into core.
2018-09-17 10:13:55 +02:00
Nikita Popov
dfa166e7ed Remove unused ZEND_FILE_LINE in i_zval_ptr_dtor 2018-09-16 17:16:26 +02:00
Dmitry Stogov
ea9628936f Move zend_verify_abstract_class() into zend_inheritance.c 2018-08-27 12:56:17 +03:00
Dmitry Stogov
92fdf9d629 Change zend_lookup_class_ex() and zend_fetch_class_by_name() prototypes to accept optional lower-case class name as zend_string*, instead of zval*. 2018-08-22 17:07:31 +03:00
Dmitry Stogov
ab8094c666 Pack zend_constant.flags and zend_constant.module_number into reserved space inside zend_constant.value. 2018-07-26 12:58:07 +03:00
Peter Kokot
8d3f8ca12a Remove unused Git attributes ident
The $Id$ keywords were used in Subversion where they can be substituted
with filename, last revision number change, last changed date, and last
user who changed it.

In Git this functionality is different and can be done with Git attribute
ident. These need to be defined manually for each file in the
.gitattributes file and are afterwards replaced with 40-character
hexadecimal blob object name which is based only on the particular file
contents.

This patch simplifies handling of $Id$ keywords by removing them since
they are not used anymore.
2018-07-25 00:53:25 +02:00
Dmitry Stogov
d77aa8fa6d Fixed typo 2018-07-19 09:41:15 +03:00
Dmitry Stogov
3b6e1ee4ee Improved "Fast Shutdown". 2018-07-17 17:31:04 +03:00
Dmitry Stogov
4a475a4976 Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Dmitry Stogov
7eb045d31a API cleanup. Removed unused functions (kept compatibility macros). 2018-07-04 00:50:57 +03:00
Dmitry Stogov
7f67513ca3 Lazy function copying from op_cache SHM into process memory 2018-06-25 19:53:58 +03:00
Nikita Popov
b592cd7b98 Merge branch 'PHP-7.2' 2018-06-22 16:23:25 +02:00
Nikita Popov
ed9d1b708b Fixed bug #76520 2018-06-22 16:22:04 +02:00
Dmitry Stogov
0b90cf85a6 Removed "dead" code (zend_hash_update() never fails) 2018-06-01 11:58:57 +03:00
Dmitry Stogov
5eb1f92f31 Use zend_string_release_ex() instread of zend_string_release() in places, where we sure about string persistence. 2018-05-28 16:27:12 +03:00
Dmitry Stogov
eafa92ba9d zend_fcall_info_cache.calling_scope is not used by zend_call_function() and doesn't have to be initialized.
It's used only as a result of zend_is_callable() in forward_static_call and spl_autoload.
2018-05-03 19:27:04 +03:00
Dmitry Stogov
a795bd8265 Optimize zend_hash_real_init() 2018-03-23 00:13:45 +03:00
Dmitry Stogov
baa9890112 Completely hide GC implementation details into zend_gc.c 2018-02-27 21:08:26 +03:00
Dmitry Stogov
12c386f5b9 Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. (reapply 781e1573af, now it should be OK). 2018-01-11 22:15:45 +03:00
Dmitry Stogov
6ba10a03e7 Revert "Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse." (this patch is incomplete or wrong)
This reverts commit 781e1573af.
2018-01-11 17:27:26 +03:00
Dmitry Stogov
781e1573af Use ZEND_CLOSURE_OBJECT() macro to resolve closure op_array to closure object through address calculation, instead of op_array->prototype reuse. 2018-01-11 16:25:28 +03:00
Gabriel Caruso
6400264856 Trailing whitespaces
Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
2018-01-03 14:38:00 +01:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Xinchen Hui
7dffc6e301 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75742 (potential memleak in internal classes's static members)
2017-12-28 16:31:40 +08:00
Xinchen Hui
650264e360 Fixed bug #75742 (potential memleak in internal classes's static members) 2017-12-28 16:31:09 +08:00
Dmitry Stogov
ac2fdc56fb zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 16:02:20 +03:00
Dmitry Stogov
d9f5ea691f zend_fcall_info_cache.initialized is removed (zend_fcall_info_cache is initialized if zend_fcall_info_cache.function_handler is set). 2017-12-27 15:15:03 +03:00
Dmitry Stogov
a6fcbb7c87 Use zend_hash_find() instead of zend_hash_find_ptr() to avoid double check 2017-12-27 13:26:06 +03:00
Dmitry Stogov
74c84cd7f0 Use zend_string_equal*() API for zend_string equality check instead of direct memcmp() usage. 2017-12-04 17:17:02 +03:00
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