1
0
mirror of https://github.com/php/php-src.git synced 2026-04-26 17:38:14 +02:00
Commit Graph

1601 Commits

Author SHA1 Message Date
Anatol Belski f3f6cd24e9 Modernize realpath and integrate quick variant into virtual_file_ex
The slower I/O as a traditional bottleneck on Windows which is
the target of this patch. The recursive path resolution, while being
an allround solution, is expensive when it comes to the common case.
Files with proper ACLs set can be resolved in one go by usage of specific
API. Those are available since Vista, so actually can be called old. Those
simpler api is used for the cases where no CWD_EXPAND is requested. For
the cases where ACLs are improper, the existing solution based on
FindFirstFile still does good job also partially providing quirks. Cases
involing reparse tags and other non local filesystems are also partially
server by new APIs.

The approach uses both APIs - the quick one for the common case still
integrating realpath cache, and the existing one as a fallback. The tests
show the I/O load drop on the realpath resolution part due to less
system calls for the sub part resolution of paths. In most case it is
justified, as the sub parts were otherwise cached or unused as well. The
realpath() implementation in ioutil is also closer to the POSIX.
2017-12-15 13:23:34 +01:00
Dmitry Stogov 83e495e0fd Move constants into read-only data segment 2017-12-14 22:14:36 +03:00
Dmitry Stogov 9e709e2fa0 Move constants into read-only data segment 2017-12-14 18:43:44 +03:00
Dmitry Stogov 9f1e970058 Reduce number of hash collisions during dulicate address detection. 2017-12-11 18:16:54 +03:00
Nikita Popov bf9e2692c0 Fix relative constant addressing in file cache
PASS_TWO_UNDO_CONSTANT was using the serialized op_array->literals
pointer, resulting in incorrect offsets.
2017-12-10 22:34:50 +01:00
David Walker 6d4de4cf05 Implement list() reference assignments
Support list() reference assignments of the form:

    list(&$a, list(&$b, $c)) = $d;

RFC: https://wiki.php.net/rfc/list_reference_assignment
2017-12-09 13:39:52 +01:00
Dmitry Stogov 0acda9103b Improved shared interned string table implementation (use less memory and more CPU cache friendly) 2017-12-08 19:55:12 +03:00
Dmitry Stogov fd453aa1d1 Intern string constant values 2017-12-07 12:27:16 +03:00
Dmitry Stogov b34660f26e Use inline assembler for fast_memcpy() 2017-12-06 17:42:47 +03:00
Kalle Sommer Nielsen 525ab4198e Introduce ZEND_EXTENSION() to the Windows build system
Zend Extensions should now be declared in their config.w32 with a ZEND_EXTENSION() call instead of EXTENSION(), the parameters sent is identical.

For a cross version compatible config.w32, the following will do:
if (typeof(ZEND_EXTENSION) == 'undefined') {
  EXTENSION(...);
} else {
  ZEND_EXTENSION(...);
}
2017-12-04 17:39:08 +01:00
Dmitry Stogov c789dfee04 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75608 ("Narrowing occurred during type inference" error)
2017-12-04 17:23:34 +03:00
Dmitry Stogov 3503dc7482 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug #75608 ("Narrowing occurred during type inference" error)
2017-12-04 17:22:28 +03:00
Dmitry Stogov 5934bff913 Fixed bug #75608 ("Narrowing occurred during type inference" error) 2017-12-04 17:22: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 e221e7379e Avoid function duplication 2017-11-30 16:23:15 +03:00
Dmitry Stogov 245422653c Functions must be stored with lowercase keys 2017-11-30 15:59:29 +03:00
Dmitry Stogov eccdc48c56 Use interned strings for function names 2017-11-30 02:06:52 +03:00
Xinchen Hui 9b6581326a Merge branch 'PHP-7.2'
* PHP-7.2:
  Update NEWS
  Update NEWs (added bug entry)
2017-11-28 13:16:51 +08:00
Xinchen Hui e02c2d2dfb Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Update NEWs (added bug entry)
2017-11-28 13:16:22 +08:00
Xinchen Hui ee9e32caca Update NEWs (added bug entry) 2017-11-28 13:15:54 +08:00
Dmitry Stogov 88e257c152 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug in type inference
2017-11-27 10:17:07 +03:00
Dmitry Stogov a4b2ae69e9 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fixed bug in type inference
2017-11-27 10:16:46 +03:00
Dmitry Stogov 776bef8447 Fixed bug in type inference 2017-11-27 10:16:16 +03:00
Xinchen Hui 3475197551 Merge branch 'PHP-7.2'
* PHP-7.2:
  Improved fix
2017-11-27 12:03:48 +08:00
Xinchen Hui 9d02227243 Improved fix 2017-11-27 12:03:37 +08:00
Xinchen Hui a84c7050fd Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed bug #75556 (Invalid opcode 138/1/1)
2017-11-25 00:54:28 +08:00
Xinchen Hui c412b8b384 Fixed bug #75556 (Invalid opcode 138/1/1) 2017-11-25 00:54:15 +08:00
Dmitry Stogov 33b094479b TYPE_CHECK instruction changed. Now it keeps in extended_value a type mask.
This makes check for "boolean" cheaper and allows check combination e.g. (is_string($a) || is_null($a))
2017-11-23 15:58:34 +03:00
Dmitry Stogov 10d2a5c09d Merge branch 'PHP-7.2'
* PHP-7.2:
  typo
2017-11-22 16:31:23 +03:00
Dmitry Stogov 2a6a1fd22c typo 2017-11-22 16:30:57 +03:00
Nikita Popov 95e9cc2871 Backport some printf() fixes to 7.2 2017-11-16 21:26:33 +01:00
Nikita Popov 26f8fc833b Enable and fix printf() format warnings
Add _unchecked() variants of zend_spprintf and zend_strpprintf for
cases where we specifically want to disable these checks, such as
use of %H.
2017-11-16 21:15:36 +01:00
Anatol Belski 20d930d8f3 Fix remaining signedness warnings 2017-11-14 17:07:09 +01:00
Anatol Belski a5bc5aed71 Patch core for PCRE2 support
RFC https://wiki.php.net/rfc/pcre2-migration
2017-11-13 19:37:38 +01:00
Dmitry Stogov 196f003937 Merge branch 'PHP-7.2'
* PHP-7.2:
  Fixed assertion on phpMyAdmin-4.7.5 home page
2017-11-08 12:52:46 +03:00
Dmitry Stogov b6294bbc6c Fixed assertion on phpMyAdmin-4.7.5 home page 2017-11-08 12:51:53 +03:00
Joe Watkins 3d12e70459 Merge branch 'PHP-7.2'
* PHP-7.2:
  fix wrong check of definition_phi->constraint.range.max_ssa_var
2017-11-03 17:50:19 +00:00
Joe Watkins c3ee17065b Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  fix wrong check of definition_phi->constraint.range.max_ssa_var
2017-11-03 17:49:52 +00:00
MITSUNARI Shigeo 21dbd2ffcd fix wrong check of definition_phi->constraint.range.max_ssa_var 2017-11-03 17:49:42 +00:00
Dmitry Stogov f2b91b31e4 Switch back from "request" interned strings storage to "permanent" in MSHUTDOWN 2017-11-02 23:29:21 +03:00
Dmitry Stogov 8897c80956 Use interned strings for stream transports 2017-11-01 02:39:09 +03:00
Dmitry Stogov bbfd0df9d3 Use interned strings for persistent stream wrappers and filters 2017-10-31 18:51:35 +03:00
Dmitry Stogov 998794f584 Always calculate calculate string hash value on attempt of interning 2017-10-31 15:35:44 +03:00
Dmitry Stogov 974a8f8ad2 Use internet strings for EG(ini_entries) 2017-10-31 02:16:46 +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
Xinchen Hui 60e8e4700c Merge branch 'PHP-7.2'
* PHP-7.2:
  Use abbrev
2017-10-30 18:17:50 +08:00
Xinchen Hui db4eb54149 Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Use abbrev
2017-10-30 18:17:41 +08: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
Xinchen Hui d9de0f8683 Use abbrev 2017-10-30 16:26:59 +08:00