1
0
mirror of https://github.com/php/php-src.git synced 2026-04-24 00:18:23 +02:00
Commit Graph

3397 Commits

Author SHA1 Message Date
Christoph M. Becker 08d2e511e4 Merge branch 'PHP-7.4' into master
* PHP-7.4:
  Fix #80002: calc free space for new interned string is wrong
2020-08-24 11:04:27 +02:00
Christoph M. Becker 10df94dd0e Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #80002: calc free space for new interned string is wrong
2020-08-24 11:04:03 +02:00
Christoph M. Becker fcd26ffcc3 Fix #80002: calc free space for new interned string is wrong
We need to calculate the free size in bytes.

Patch contributed by t-matsuno.

Closes GH-6024
2020-08-24 11:03:19 +02:00
Dmitry Stogov 8095a0ef7f Better register usage for ASSIGN_DIM_OP 2020-08-21 09:50:28 +03:00
Dmitry Stogov 35a3e450bc Better registers usage 2020-08-21 01:57:03 +03:00
Dmitry Stogov c64cb19138 cleanup unused parameters 2020-08-20 20:43:40 +03:00
Dmitry Stogov dd29a6e79e efree() doesn't use line number arguments (pass zeros) 2020-08-20 20:39:13 +03:00
Dmitry Stogov 22982eee33 Load zval type into register to eliminate double load 2020-08-19 17:51:23 +03:00
Dmitry Stogov bcadf9da8a Shrink live intervals of IS_VAR/IS_TMP_VAR 2020-08-19 14:53:01 +03:00
Dmitry Stogov c6c1682d7a Fixed tracing JIT crash in case SSA for op_array is not provided 2020-08-19 14:51:39 +03:00
Dmitry Stogov f559c78000 Check for exception after $this destruction 2020-08-18 21:13:18 +03:00
Dmitry Stogov f2d8488806 Fixed register allocation for CASE instruction. CASE don't destroy first operand and it may be used later in VM or different trace. 2020-08-18 21:10:34 +03:00
Dmitry Stogov 6f36b20abf Don't add guard for empty() 2020-08-18 13:13:58 +03:00
Dmitry Stogov 5d94ff8a00 JIT extension may be NULL 2020-08-18 09:28:13 +03:00
Dmitry Stogov fd0b57d48b Fixed support for named arguments 2020-08-18 00:12:05 +03:00
Dmitry Stogov 3343eb64d7 Fixed trace type inference for FE_FETCH_R/RW 2020-08-17 22:55:25 +03:00
Dmitry Stogov 32052e7470 Fixed support for possible indirect variable modification (ext/standard/tests/array/bug77135.phpt failure). 2020-08-17 22:31:03 +03:00
Dmitry Stogov afc93e44e5 JIT for ZEND_ISSET_ISEMPTY_CV 2020-08-17 20:48:48 +03:00
Dmitry Stogov 28e24e7acc Fixed JIT for indirectly recursive traces 2020-08-17 20:47:06 +03:00
Dmitry Stogov a02237d2a9 Removed outdated/duplicated code 2020-08-17 15:24:33 +03:00
Dmitry Stogov 8202b4ed09 Properly patch jmp tables 2020-08-17 13:50:03 +03:00
Nikita Popov 75baa729f5 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79917
2020-08-11 14:59:04 +02:00
Nikita Popov 4609ded082 Fixed bug #79917
op_arrays can be shared on two levels: Either the op_array is
completely shared, or it is distinct but shares all members
(apart from static_variables).

The the op_array is distinct, we need to make sure to properly
initialize the MAP_PTR structures.
2020-08-11 14:58:54 +02:00
Nikita Popov c439f1fa6a Fixed bug #62294
The primary issue was already resolved in 7c3e487289,
but the particular example used in this bug report ran into an
additional issue on PHP 8, because I forgot to drop a number of
zend_bailout calls when switch require failure to throw.
2020-08-10 12:54:02 +02:00
Máté Kocsis 7aacc705d0 Add many missing closing PHP tags to tests
Closes GH-5958
2020-08-09 22:03:36 +02:00
David Carlier 327db7e595 opcache gdb: Set the EI_OSABI value for NetBSD.
Closes GH-5948.
2020-08-07 17:00:32 +02:00
Nikita Popov 643145b59d Merge branch 'PHP-7.4'
* PHP-7.4:
  Fixed bug #79930
  Fix iov_base pointer type for illumos
  Backport bless_tests.php changes from PHP 8
2020-08-05 15:44:04 +02:00
Nikita Popov 9d9fa32fe5 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix iov_base pointer type for illumos
2020-08-05 15:18:03 +02:00
David Carlier 12db8b90a7 Fix iov_base pointer type for illumos
These systems has two versions of the iovec interface dependent on
compiler flags passed, the legacy version causing little build issue.

Closes GH-5939.
2020-08-05 15:17:51 +02:00
David Carlier 362194165a Fix opcache JIT on NetBSD with PaX
When PaX mprotect active, opcache JIT test fail as it needs
the PROT_MPROTECT macro to be able to allow further permission
promotion with mprotect.

Closes GH-5929.
2020-08-04 10:34:31 +02:00
Benjamin Eberlei 53ef244923 Add opcache.jit=tracing|function values, make on/yes/true synonym for tracing. 2020-08-04 10:15:22 +02:00
Máté Kocsis 4c89ed61fb Promote warnings to exceptions in ext/gettext, ext/sysvmsg and ext/xml
Closes GH-5926
2020-08-03 20:09:28 +02:00
Nikita Popov c48b745f00 Promote "undefined array key" notice to warning
This implements the last remaining part of the
https://wiki.php.net/rfc/engine_warnings RFC.

Closes GH-5927.
2020-08-03 14:40:50 +02:00
Nikita Popov d92229d8c7 Implement named parameters
From an engine perspective, named parameters mainly add three
concepts:

 * The SEND_* opcodes now accept a CONST op2, which is the
   argument name. For now, it is looked up by linear scan and
   runtime cached.
 * This may leave UNDEF arguments on the stack. To avoid having
   to deal with them in other places, a CHECK_UNDEF_ARGS opcode
   is used to either replace them with defaults, or error.
 * For variadic functions, EX(extra_named_params) are collected
   and need to be freed based on ZEND_CALL_HAS_EXTRA_NAMED_PARAMS.

RFC: https://wiki.php.net/rfc/named_params

Closes GH-5357.
2020-07-31 15:53:36 +02:00
Dmitry Stogov b3e12325f6 Fixed JIT when result of ASSIGN is in register, but the original variable might need to be destroyed 2020-07-31 12:31:46 +03:00
Nikita Popov 47e4001976 Remove more unused func_info fields 2020-07-30 18:50:12 +02:00
Dmitry Stogov 8ea9e1ae4c We check result type guard in FETCH_DIM_R/IS only if index is long or string. 2020-07-30 19:19:10 +03:00
Nikita Popov 9dacc85251 Add type inference support for RECV_VARIADIC 2020-07-30 17:14:34 +02:00
Nikita Popov 104b7addc4 Remove unused recv_arg_info from func_info 2020-07-30 17:04:56 +02:00
Nikita Popov ce22cf5198 Remove some dead code in RECV type inference
We must always have arg_info corresponding to RECV.
2020-07-30 16:55:21 +02:00
Dmitry Stogov 28eaad0969 Clear result type for exit point caused by JMPZ_EX/NZ_EX 2020-07-30 17:01:08 +03:00
Dmitry Stogov 8b43976483 Fixed memory leaks caused by incorrect AVOID_REFCOUNTING flag 2020-07-30 16:59:41 +03:00
Dmitry Stogov 41de27ecc2 Skip tests leaking because of preloading failure. 2020-07-30 14:04:14 +03:00
Nikita Popov 3690a805c1 Check non-zero in is_power_of_two()
And assert non-zero in floor_log2().

Fixes DASM_S_RANGE_I in ext/simplexml/tests/021.phpt.
2020-07-30 10:17:37 +02:00
Dmitry Stogov bbbccf0811 Force type update if the previous value was in register only 2020-07-30 01:32:23 +03:00
Dmitry Stogov 713d3ea4e6 Don't skip fcall guard for method calls from trait 2020-07-30 00:31:46 +03:00
Dmitry Stogov 44384dfb3e Fixed temporary register usage 2020-07-29 22:01:19 +03:00
Christoph M. Becker d95c53834c Amendment to OPcache base file removal
We fix the erroneous segment size.  We also keep the segment pointer at
the allocated address, but increase the position instead.
2020-07-29 18:44:08 +02:00
Christoph M. Becker 88a3bdd1e4 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #73060: php failed with error after temp folder cleaned up
2020-07-29 18:31:28 +02:00
Christoph M. Becker 2bcc419800 Fix #73060: php failed with error after temp folder cleaned up
Instead of storing the mapping base address and the address of
`execute_ex()` in a separate file in the temporary folder, we store
them right at the beginning of the memory mapping.
2020-07-29 18:21:05 +02:00