Nikita Popov
774cdb1d59
Merge branch 'PHP-7.3' into PHP-7.4
2019-08-26 11:13:57 +02:00
Nikita Popov
e4ecadcb62
Merge branch 'PHP-7.2' into PHP-7.3
2019-08-26 11:13:49 +02:00
Tyson Andre
1e82a2d659
Also fix signature for passthru
...
Backported from a1a8d14485
https://www.php.net/manual/en/function.passthru.php#refsect1-function.passthru-returnvalues
`passthru()` is false with invalid args
`passthru('command')` is null.
2019-08-26 11:13:26 +02:00
Tyson Andre
f5bccc0eb5
Fix opcache optimizer info for time_nanosleep
...
This can also return an array. See
https://www.php.net/manual/en/function.time-nanosleep.php#refsect1-function.time-nanosleep-returnvalues
> If the delay was interrupted by a signal, an associative array will be
returned with the components:
>
> - seconds - number of seconds remaining in the delay
> - nanoseconds - number of nanoseconds remaining in the delay
Sending a SIGUSR1 to the below program would trigger this behavior.
```
pcntl_signal(\SIGUSR1, function ($signo, $signinfo) {
echo "Handling a signal $signo\n";
});
echo "Sleeping for 100 seconds\n";
var_export(time_nanosleep(100, 0));
```
The incomplete signature existed since c88ffa9a5
.
No phpt tests existed for time_nanosleep returning an array
2019-08-26 11:13:26 +02:00
George Peter Banyard
1059e3dc39
Promote warnings to errors in str_repeat()
2019-08-23 20:01:19 +02:00
Tyson Andre
50be2ecbd7
Fix opcache type info for stream_bucket_make_writable()
...
Closes GH-4567.
2019-08-20 16:21:53 +02:00
Nikita Popov
19378ae44a
Merge branch 'PHP-7.4'
2019-08-13 11:23:35 +02:00
Nikita Popov
76fecb339f
Merge branch 'PHP-7.3' into PHP-7.4
2019-08-13 11:23:06 +02:00
Nikita Popov
a33361a37c
Merge branch 'PHP-7.2' into PHP-7.3
2019-08-13 11:22:41 +02:00
Nikita Popov
4eeb41d1ea
Fixed bug #77191
2019-08-13 11:19:58 +02:00
Dmitry Stogov
f64650408a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
typo
2019-08-06 13:58:29 +03:00
Dmitry Stogov
ef35556498
typo
2019-08-06 13:58:17 +03:00
Dmitry Stogov
e2440c3da5
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Preloading is not comatible with dl() function
2019-08-06 12:45:48 +03:00
Dmitry Stogov
d5d76ea6e7
Preloading is not comatible with dl() function
2019-08-06 12:44:55 +03:00
Dmitry Stogov
d6a8a5ac64
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78376 (Incorrect preloading of constant static properties)
2019-08-05 22:56:03 +03:00
Dmitry Stogov
3fc0e2bb80
Fixed bug #78376 (Incorrect preloading of constant static properties)
2019-08-05 22:55:06 +03:00
Nikita Popov
21cd438c33
Merge branch 'PHP-7.4'
2019-08-01 17:00:49 +02:00
Nikita Popov
bf53d30fae
Fix forwarding of extra args in opcache server tests
2019-08-01 17:00:11 +02:00
Nikita Popov
e63093e547
Merge branch 'PHP-7.4'
2019-08-01 10:11:02 +02:00
Nikita Popov
afd96392a3
Revert "Use RW fetch for argument unpacking"
...
This reverts commit 6913ec3282
.
This reverts commit a9e332e027
.
Causes https://bugs.php.net/bug.php?id=78356 , which I don't have
a good solution for.
2019-08-01 10:06:53 +02:00
Nikita Popov
a4cfbeb143
Merge branch 'PHP-7.4'
2019-07-30 10:32:26 +02:00
Nikita Popov
a9e332e027
Handle RW UNPACK in inference
2019-07-30 10:31:51 +02:00
Christoph M. Becker
7548421202
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix build for --disable-signals
2019-07-29 18:50:13 +02:00
Christoph M. Becker
3429370d69
Fix build for --disable-signals
2019-07-29 18:49:44 +02:00
Nikita Popov
9a3aef3c21
Merge branch 'PHP-7.4'
2019-07-29 17:15:35 +02:00
Nikita Popov
6df1665bb3
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 17:14:40 +02:00
Nikita Popov
bbed5564eb
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-29 16:57:57 +02:00
Nikita Popov
38f1288b64
Fix Zend signals unblocking
...
There are a few parts here:
* opcache should not be blocking signals while invoking compile_file,
otherwise signals may remain blocked on a compile error. While at
it, also protect SHM memory during compile_file.
* We should deactivate Zend signals at the end of the request, to make
sure that we gracefully recover from a missing unblock and signals
don't remain blocked forever.
* We don't use a critical section in deactivation, because it should
not be necessary. Additionally we want to clean up the signal queue,
if it is non-empty.
* Enable SIGG(check) in debug builds so we notice issues in the future.
2019-07-29 15:17:32 +02:00
Nikita Popov
45eabeca81
Merge branch 'PHP-7.4'
2019-07-29 13:03:59 +02:00
Nikita Popov
a22a06c351
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-29 13:03:53 +02:00
Nikita Popov
8e63bb5e46
Fixed bug #78341
...
The smart branch logic assumed b->start refers to the old offsets,
while b->start was already adjusted to the new offsets at this
point. Delay the change until later.
2019-07-29 13:02:01 +02:00
Nikita Popov
36db71df47
Merge branch 'PHP-7.4'
2019-07-22 12:28:40 +02:00
Nikita Popov
b3f74b0b7d
Deprecate allow_url_include
2019-07-22 11:39:52 +02:00
Dmitry Stogov
97912023bb
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
2019-07-19 11:46:35 +03:00
Dmitry Stogov
445d51347d
Use run-time cache to avoid repeatable hash lookups in ZEND_DECLARE_CLASS_DELAYED
2019-07-19 11:46:03 +03:00
Nikita Popov
eb766751dc
Merge branch 'PHP-7.4'
2019-07-19 10:06:30 +02:00
rjhdby
d574df63dc
Deprecate alternative array access syntax
...
RFC: https://wiki.php.net/rfc/deprecate_curly_braces_array_access
2019-07-19 10:06:10 +02:00
Dmitry Stogov
3cc6dd9c76
Fixed JIT
2019-07-19 10:50:51 +03:00
Dmitry Stogov
a837b80a48
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use run-time cache to avoid repeatable hash lookups when creating anonymous functions and classes
2019-07-19 10:45:00 +03:00
Dmitry Stogov
d5943f5a11
Use run-time cache to avoid repeatable hash lookups when creating anonymous functions and classes
2019-07-19 10:43:49 +03:00
Dmitry Stogov
5ac3580b9b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
2019-07-19 10:10:50 +03:00
Dmitry Stogov
b065fbde19
ZEND_DECLARE_ANON_CLASS doesn't need to skip anything now. It's immediatelly followed by ZEND_NEW.
2019-07-19 10:09:26 +03:00
Peter Kokot
139ecf84ff
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Update changelog
Remove unused HAVE_SHM_MMAP_ZERO and HAVE_SHM_MMAP_FILE
2019-07-18 02:13:32 +02:00
Peter Kokot
6afc3cede8
Remove unused HAVE_SHM_MMAP_ZERO and HAVE_SHM_MMAP_FILE
...
Closes GH-4424
2019-07-18 02:11:19 +02:00
Christoph M. Becker
54401001a8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Allow multiple cache instances per user/host on Windows
2019-07-17 19:52:49 +02:00
Christoph M. Becker
e2ed7e6716
Allow multiple cache instances per user/host on Windows
...
Formerly, there was at most a single OPcache instance per user and the
so called system ID (which is determined from the PHP version).
Sometimes multiple OPcaches might be desired, though, particularly for
unrelated CLI scripts, which may even be necessary (e.g. for our test
suite in parallel mode).
We therefore introduce a new INI directive `opcache.cache_id` which
allows to configure independent OPcache instances for the same user.
We also use `GetUserNameW()` instead of `php_win32_get_username()`,
because the latter retrieves the user name encoded in the
`default_charset`, which can obviously yield different results for
different charsets, leading to OPcache "incompatibilities". Slightly
worse, some characters may not even be encodeable in the
`default_charset` and would be replaced by question marks, which could
result in different users sharing the same OPcache.
We also refactor, and re-use existing APIs to avoid duplicated code.
2019-07-17 19:51:07 +02:00
Dmitry Stogov
ca68570609
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Provide type info
2019-07-16 22:56:47 +03:00
Dmitry Stogov
a6812c0c84
Provide type info
2019-07-16 22:56:20 +03:00
Nikita Popov
c4a6998c62
Merge branch 'PHP-7.4'
2019-07-16 17:45:03 +02:00
Nikita Popov
b317f0eb59
Remove ZEND_HANDLE_MAPPED
...
The buf/len members are now simply used in addition to the main
stream, without changing the handle kind.
2019-07-16 17:44:32 +02:00
Nikita Popov
3faa903d47
Merge branch 'PHP-7.4'
2019-07-16 16:44:46 +02:00
Nikita Popov
49bac9b77b
Introduce zend_stream_init_filename()
...
Avoid more ad-hoc initialization of zend_file_handle structures.
2019-07-16 16:44:37 +02:00
Nikita Popov
06cf349dc3
Merge branch 'PHP-7.4'
2019-07-16 15:48:24 +02:00
Nikita Popov
e08cc4d921
Remove ZEND_HANDLE_FD
...
This handle type was unused.
2019-07-16 15:47:10 +02:00
Nikita Popov
760308cbff
Fix build without jit
2019-07-16 10:26:25 +02:00
Nikita Popov
8a10258a53
Merge branch 'PHP-7.4'
2019-07-15 10:33:31 +02:00
Nikita Popov
a520c24269
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-15 10:29:37 +02:00
Nikita Popov
3eb057c4a7
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-15 10:23:51 +02:00
Andrew Collington
768ad70f70
Fix bug #78291 Missing opcache directives
...
New opcache directives have been added recently which are returned
if using `ini_get_all('zend opcache')` but are not listed in the
directives if using `opcache_get_configuration()`. This fix adds
those missing directives as well as if `opcache.mmap_base` is used
instead of `opcache.lockfile_path`. Also adds a test to ensure the
directives match with both methods of fetching.
2019-07-15 10:22:47 +02:00
Nikita Popov
74bf7bfb88
Merge branch 'PHP-7.4'
2019-07-11 15:49:02 +02:00
Nikita Popov
17f7fb7605
Switch to using shell-less proc_open() in various server tests
2019-07-11 15:48:10 +02:00
Nikita Popov
cf7dd00280
Drop support for JIT without SSE
...
Closes GH-4388.
2019-07-10 17:31:51 +02:00
Nikita Popov
df84d680bf
Merge branch 'PHP-7.4'
2019-07-10 17:28:52 +02:00
Nikita Popov
a54ee8a947
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-10 17:28:37 +02:00
Nikita Popov
e7a83ec8df
Fix bug #78271
...
When cleaning nops in the dfa pass, we were always keeping the
smart branch inhibiting nop that occurs directly before the jump
instruction. However, as we skip unreachable blocks entirely, it
may happen that we need to keep a nop that occurs further back,
prior to the unreachable blocks. Account for that case now.
We should really do something about the smart branch situation,
this is very fragile...
2019-07-10 17:25:40 +02:00
Nikita Popov
36235cf5d7
Read from original address
...
References are derefed into FCARG1, which is later clobbered by the
undef handling code. Make sure we load from the original address
instead.
2019-07-10 14:13:29 +02:00
Nikita Popov
26431d1995
Implement array access notice in JIT
2019-07-10 12:20:16 +02:00
Dmitry Stogov
db02d7ae75
Reduce cost for GC references to strings and resources in JIT
2019-07-10 12:41:19 +03:00
Nikita Popov
3ee570ae0d
Remove redundant variable declaration
2019-07-08 12:50:00 +02:00
David Carlier
5e13688142
JIT: Reading php binary symbols list on FreeBSD
...
Closes GH-4363.
2019-07-08 12:39:18 +02:00
Nikita Popov
da8b583ac1
Always generate interrupt check in jit
...
Even if zend_interrupt_function is NULL, we still need to perform
the interrupt check for timeouts (which do not use
zend_interrupt_function).
2019-07-05 20:52:30 +02:00
Nikita Popov
e3c701ea38
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-05 12:07:10 +02:00
Nikita Popov
5846e85283
Backport fe_reset_rw case
2019-07-05 12:06:52 +02:00
Nikita Popov
a92e6d7136
Merge branch 'PHP-7.4'
2019-07-05 12:05:10 +02:00
Nikita Popov
73fd2da754
Make sure all cases of fetch_dim_w adjustment are handled
...
Use EMPTY_SWITCH_DEFAULT_CASE() to trigger an assertion in case
we miss something.
Add missing FE_RESET_RW case.
2019-07-05 12:02:26 +02:00
Nikita Popov
8ae9e1b9a2
Merge branch 'PHP-7.4'
2019-07-05 11:43:26 +02:00
Nikita Popov
1086198711
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-05 11:41:57 +02:00
Nikita Popov
920283ff2b
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-05 11:40:45 +02:00
Nikita Popov
c353f17d42
Fix inference for compound object op on dim
2019-07-05 11:39:42 +02:00
Dmitry Stogov
1f800e2f82
Removed die('skip wurstuoppe');
2019-07-05 12:20:12 +03:00
Dmitry Stogov
1b5b8175af
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:16:30 +03:00
Dmitry Stogov
48ca5a1e17
Replace ZEND_ASSIGN_ADD (and others) by ZEND_ASSIGN_OP, ZEND_ASSIGN_DIM_OP, ZEND_ASSGIN_OBJ_OP and ZEND_ASSIGN_STATIC_PROP_OP
2019-07-05 12:03:25 +03:00
Nikita Popov
215e9d069c
Merge branch 'PHP-7.4'
2019-07-05 11:00:54 +02:00
Nikita Popov
24ecfcc833
Add test
...
Forgot to commit this.
2019-07-05 11:00:27 +02:00
Nikita Popov
f8d8b96e92
Merge branch 'PHP-7.4'
2019-07-05 10:47:01 +02:00
Nikita Popov
ea43624972
Fix wrong size calculation related to function name
...
It would be nice if we could drop this manual function name reuse
code altogether and rely on interning for it.
2019-07-05 10:46:41 +02:00
Nikita Popov
d3c4841b18
Preloading: Don't move conditional functions to back to scripts
...
Conditional function declaration may be referenced by functions or
classes that have been preloaded, so we should not move them back
to scripts.
What we probably should be doing though is to discard conditional
functions that are not used in the optimizer. This is probably
reasonably common for polyfills, where we will be able to const-eval
the conditions and drop the BBs declaring the functions, but won't
delete the function declarations themselves.
2019-07-05 10:46:41 +02:00
Nikita Popov
9fbf9e3e13
Merge branch 'PHP-7.4'
2019-07-04 17:13:04 +02:00
Nikita Popov
a0e7624059
Compact literals: Don't insert unmergeable keys
...
LITERAL_VALUE with related literals cannot be merged, avoid inserting
them in the literals hash in the first place. Otherwise we may end up
inserting the same key multiple times. We may also miss merging
opportunities due to the duplicate keys.
2019-07-04 17:12:55 +02:00
Nikita Popov
8c647946ff
Merge branch 'PHP-7.4'
2019-07-04 12:20:40 +02:00
Nikita Popov
b250f89b92
Preloading: Relax known type restrictions
...
Check whether there is a parent/interface/trait method with the same
name and only then require the type to be known. This reduces the
number of cases where this triggers in practice a lot.
2019-07-04 12:20:32 +02:00
Nikita Popov
4a2646cf45
Preloading: Also handle trait methods outside main script
2019-07-04 12:20:31 +02:00
Nikita Popov
6473ec30a1
Merge branch 'PHP-7.4'
2019-07-04 11:07:14 +02:00
Nikita Popov
df243f19be
Preloading: Prevent autoloading while resolving constants
2019-07-04 11:05:01 +02:00
Nikita Popov
f124bf22e0
Merge branch 'PHP-7.4'
2019-07-03 14:05:31 +02:00
Nikita Popov
f857648270
Improve unlinked class diagnostics during preloading
2019-07-03 14:05:10 +02:00
Nikita Popov
fa1a03f7a2
Merge branch 'PHP-7.4'
2019-07-03 10:22:41 +02:00
Nikita Popov
c0924cf67d
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-03 10:20:32 +02:00
Nikita Popov
4892bbc167
Fixed bug #78230
2019-07-03 10:20:07 +02:00
Nikita Popov
ad81aae8bf
Merge branch 'PHP-7.4'
2019-07-02 12:28:51 +02:00
Nikita Popov
4a08885ed9
Merge branch 'PHP-7.3' into PHP-7.4
2019-07-02 12:28:46 +02:00
Nikita Popov
7174c44557
Merge branch 'PHP-7.2' into PHP-7.3
2019-07-02 12:28:37 +02:00
Alex Scott
a4acff3e21
Fix bug #78138 : opcache.validate_permission incorrectly works with PHAR files
...
opcache incorrectly handles PHAR files when opcache.validate_permission
option enabled, because it calls
access("phar://path-to/file.phar/path/inside.php", R_OK);
rather than
access("path-to/file.phar", R_OK)
2019-07-02 12:25:50 +02:00
Nikita Popov
2f7c3971cc
Merge branch 'PHP-7.4'
2019-07-02 11:59:21 +02:00
David Carlier
7f1fef9fe0
Fix opcache huge page mapping on FreeBSD
...
Too much room were given process mappings and were not unmapped.
Closes GH-4345.
2019-07-02 11:59:08 +02:00
Christoph M. Becker
fc94e0fc6e
Fix SKIPIF conditions
...
The SKIPIF sections are executed in the directory where run-tests.php
is located; therefore a relative path like `../skipif.inc` won't work
as desired.
2019-07-01 19:47:23 +02:00
Christoph M. Becker
8a0717255c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Add missing SKIPIFs
2019-07-01 18:14:55 +02:00
Christoph M. Becker
52a0630cd4
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add missing SKIPIFs
2019-07-01 18:13:52 +02:00
Christoph M. Becker
3e25ddb07b
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Add missing SKIPIFs
2019-07-01 18:12:28 +02:00
Christoph M. Becker
57688ad7bf
Add missing SKIPIFs
...
All these tests are meant to run with OPcache available, and some will
even fail inevitably without it, so we add OPcache as SKIPIF
requirement.
2019-07-01 18:11:13 +02:00
Christoph M. Becker
017e293992
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Add missing SKIPIFs
2019-07-01 17:25:31 +02:00
Christoph M. Becker
42bedcfb50
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Add missing SKIPIFs
2019-07-01 17:24:33 +02:00
Christoph M. Becker
99e6c701e6
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Add missing SKIPIFs
2019-07-01 17:22:55 +02:00
Christoph M. Becker
75bc3446f8
Add missing SKIPIFs
...
All these tests are meant to run with OPcache available, and some will
even fail inevitably without it, so we add OPcache as SKIPIF
requirement.
2019-07-01 17:21:16 +02:00
Nikita Popov
4e1a225e3e
Merge branch 'PHP-7.4'
2019-07-01 16:55:39 +02:00
David Carlier
994a01ea43
opcache huge pages: Little fix for FreeBSD
...
Calculating the vm entries size beforehand, as we could
possibly miss few entries.
Closes GH-4344.
2019-07-01 16:55:23 +02:00
Christoph M. Becker
b8d6d4a2bd
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix brittle test
2019-07-01 16:45:49 +02:00
Christoph M. Becker
237f07ea9d
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix brittle test
2019-07-01 16:44:54 +02:00
Christoph M. Becker
d714be0f57
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix brittle test
2019-07-01 16:43:47 +02:00
Christoph M. Becker
be559e6c37
Fix brittle test
...
This test is easily tripped by former test runs with other PHP
versions. To avoid such false positives, we check that there is at
least one respective OPcache file, and that all found OPcache user ID
folders have exactly 32 hexadecimal digits.
2019-07-01 16:42:55 +02:00
Nikita Popov
8fc58a1a1d
Merge branch 'PHP-7.4'
2019-07-01 11:14:54 +02:00
Nikita Popov
da06f7f383
Msan: Unpoison buffer written by file cache
...
It would be great if this were fully initialized, but it's not
really a problem either (as long as we don't care about reproducible
file cache), so ignore this for now.
2019-07-01 11:14:28 +02:00
Nikita Popov
c8af6a7fa7
Don't use fast_memcpy under msan
2019-07-01 11:14:23 +02:00
Nikita Popov
4a8fe02c7c
Undef opline result on mod/shift error in jit
2019-07-01 10:15:06 +02:00
Nikita Popov
b7ed20662e
Fix out of bounds read in jit_fetch_obj_read
2019-07-01 09:54:21 +02:00
Peter Kokot
98d0892dd8
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Sync functions checks
2019-06-30 23:59:47 +02:00
Peter Kokot
9a3c8e51e3
Sync functions checks
...
Removed unused checks:
- mbsinit check removed, HAVE_MBSINIT removed (not used in php-src)
- mempcpy check removed, HAVE_MEMPCPY removed (not used in php-src anymore since
560ed89bfb
which uses PHP's own implementation)
- strpncpy check removed, added via a8c9e893b6
and
not used.
- setpgid check removed since HAVE_SETPGID is not used
Moved to a central configure.ac:
- fpclass
- mbrlen moved to configure.ac (since the HAVE_MBRLEN is used accross the php-src)
- sigprocmask
- getcwd
- getwd
- glob
- strfmon
- nice
Duplicated checks removed:
- gethostname
- getlogin
- getpwuid_r
- socketpair
- mprotect check simplified
2019-06-30 23:57:54 +02:00
Nikita Popov
b98c148f78
Merge branch 'PHP-7.4'
2019-06-28 15:05:00 +02:00
Nikita Popov
54dd762f59
Set up asan+ubsan scheduled build on azure
...
Also adds an --asan flag to run-tests.php to setup all the necessary
environment variables. Some tests are marked as skipped because they
are incompatible with asan or too slow.
I'm basing this on the DEBUG_ZTS build, which seems to give us the
most mileage.
2019-06-28 15:00:54 +02:00
Nikita Popov
0a0ca984f0
Merge branch 'PHP-7.4'
2019-06-28 14:48:08 +02:00
Nikita Popov
ca6f41aa5a
Fix out of bounds read in sccp
2019-06-28 14:47:49 +02:00
Nikita Popov
aa8d70f309
Merge branch 'PHP-7.4'
2019-06-28 09:19:49 +02:00
Nikita Popov
a78adce5cb
Free ZTS lock in opcache
...
For some reason this only shows up as a leak when using phpdbg.
2019-06-28 09:18:14 +02:00
Peter Kokot
7f994990ea
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Remove HAVE_STRCOLL check
2019-06-28 00:13:25 +02:00
Peter Kokot
638c21765c
Remove HAVE_STRCOLL check
...
The strcoll function is defined in the C89 standard and should be
on today's systems always available via the <string.h> header.
https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3
- Remove also SKIPIF strcoll check in test
2019-06-28 00:05:55 +02:00
Nikita Popov
e31936205b
Merge branch 'PHP-7.4'
2019-06-27 16:16:57 +02:00
Nikita Popov
40d6147dd0
Fix opcache blacklist leak
...
Don't recompute (and leak) the regex for every glob element, only
do this once at the end.
2019-06-27 16:11:58 +02:00
Peter Kokot
6bfa6bff0b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Clean headers checks
2019-06-27 02:45:31 +02:00
Peter Kokot
2079b09854
Clean headers checks
...
Some headers were checked multiple times in the main configure.ac file
and in the bundled extensions or SAPIs themselves. Also many of these
checks are then used accross other extensions or SAPIs so a central
configure.ac makes most sense for these checks.
2019-06-27 02:45:09 +02:00
Christoph M. Becker
d1141ff24b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78202 : Opcache stats for cache hits are capped at 32bit NUM
2019-06-25 13:07:00 +02:00
Christoph M. Becker
ead40e31e9
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78202 : Opcache stats for cache hits are capped at 32bit NUM
2019-06-25 13:06:20 +02:00
Christoph M. Becker
18bba63f39
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78202 : Opcache stats for cache hits are capped at 32bit NUM
2019-06-25 13:04:28 +02:00
Christoph M. Becker
4366f22dfc
Fix #78202 : Opcache stats for cache hits are capped at 32bit NUM
...
We use the proper format specifiers now.
2019-06-25 13:00:28 +02:00
Dmitry Stogov
ca22c456ca
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time
2019-06-25 11:32:03 +03:00
Dmitry Stogov
759f4ecd8b
Keep lowercased parent class name as second argument of DECLARE_CLASS to avoid extra work at run-time
2019-06-25 11:30:58 +03:00
Dmitry Stogov
e18c60cd8d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug 78175 (Preloading must store default values of static variables and properties)
2019-06-24 20:34:05 +03:00
Dmitry Stogov
0f29fb5cd8
Fixed bug 78175 (Preloading must store default values of static variables and properties)
2019-06-24 20:32:27 +03:00
Nikita Popov
38909b7526
Merge branch 'PHP-7.4'
2019-06-21 10:25:17 +02:00
Nikita Popov
7a1ca07a60
Don't try to exclude zreg_none
...
zreg_none has no representation in the regset, so this operation
doesn't make sense.
2019-06-21 10:24:58 +02:00
Nikita Popov
8227e0f747
Avoid ub in shift overflow check
...
Also fix an off-by-one error. While 1 << 63 overflows, -1 << 63 does
not.
2019-06-21 10:24:27 +02:00
Nikita Popov
291eb19419
Dasm: Perform unaligned stores through unaligned pointers
2019-06-21 09:47:25 +02:00
Dmitry Stogov
1707f6645a
Additional fix for bug #78185 (File cache no longer works)
2019-06-21 10:06:35 +03:00
Christoph M. Becker
360b58e43b
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78189 : file cache strips last character of uname hash
2019-06-20 18:02:01 +02:00
Christoph M. Becker
2b4fc9eb9c
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78189 : file cache strips last character of uname hash
2019-06-20 18:01:02 +02:00
Christoph M. Becker
a85254b898
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78189 : file cache strips last character of uname hash
2019-06-20 17:59:59 +02:00
Christoph M. Becker
fcd6f2de60
Fix #78189 : file cache strips last character of uname hash
...
We must not forget to increase `len` by one to cater to the directory
separator.
2019-06-20 17:58:32 +02:00
Nikita Popov
42f3ed480d
Avoid shift ub for regsets
2019-06-20 17:24:32 +02:00
Christoph M. Becker
9147d06f7d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Rename test file to reflect the appropriate ticket number
2019-06-20 16:55:22 +02:00
Christoph M. Becker
ecae9100dc
Rename test file to reflect the appropriate ticket number
2019-06-20 16:54:17 +02:00
Remi Collet
50978128f5
Merge branch 'PHP-7.4'
...
* PHP-7.4:
fix test for Windows and for parallel run
2019-06-20 11:59:21 +02:00
Remi Collet
961935fde2
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
fix test for Windows and for parallel run
2019-06-20 11:59:04 +02:00
Remi Collet
676b564f43
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
fix test for Windows and for parallel run
2019-06-20 11:58:49 +02:00
Remi Collet
d8202bf917
fix test for Windows and for parallel run
2019-06-20 11:58:32 +02:00
Remi Collet
714cd7ff3e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
improve test clean section
move NEWS entry
2019-06-20 11:52:54 +02:00
Remi Collet
522cf62906
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
improve test clean section
move NEWS entry
2019-06-20 11:52:25 +02:00
Remi Collet
d7597f73cc
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
improve test clean section
2019-06-20 11:51:51 +02:00
Remi Collet
b3cfeda3c7
improve test clean section
2019-06-20 11:51:18 +02:00
Nikita Popov
a2d0899e74
Merge branch 'PHP-7.4'
2019-06-20 10:35:38 +02:00
Nikita Popov
e162a1c02e
Fix maybe uninit warning
2019-06-20 10:35:22 +02:00
Remi Collet
477f4fec6d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
add test for #78185
2019-06-20 10:28:46 +02:00
Remi Collet
fa70aedf03
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
add test for #78185
2019-06-20 10:28:26 +02:00
Remi Collet
a197dc72c3
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
add test for #78185
2019-06-20 10:28:00 +02:00
Remi Collet
63f2d88088
add test for #78185
2019-06-20 10:27:33 +02:00
Nikita Popov
681136212f
Merge branch 'PHP-7.4'
2019-06-20 10:16:31 +02:00
Nikita Popov
117c7b3f65
Avoid overflow in mul range calculation
...
By using ZEND_SIGNED_MULTIPLY_LONG, which already implemented
efficient overflow checking logic.
2019-06-20 09:57:55 +02:00
Nikita Popov
3a97b8b4f9
Backport "Avoid UB in overflow checks"
...
Cherry-pick of bb940d9969
without
the JIT parts.
2019-06-20 09:51:05 +02:00
Nikita Popov
ccfe6c862a
Avoid memset/memcpy null ub in block pass
...
The arena allocator has no problem with zero-size allocations (and
will just return the same pointer for each in this case), so just
do that to avoid null pointers.
2019-06-20 09:49:07 +02:00
Dmitry Stogov
e177791df1
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78185 (File cache no longer works)
2019-06-20 09:08:09 +03:00
Dmitry Stogov
05c8f1ff2e
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed bug #78185 (File cache no longer works)
2019-06-20 09:07:39 +03:00
Dmitry Stogov
35acda856a
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed bug #78185 (File cache no longer works)
2019-06-20 09:05:50 +03:00
Dmitry Stogov
cd6a6e4cf2
Fixed bug #78185 (File cache no longer works)
2019-06-20 09:04:14 +03:00
Nikita Popov
bb940d9969
Avoid UB in overflow checks
...
Some of the overflow checks in zend_may_overflow were optimized
away by clang, causing JIT failures on release macos.
2019-06-19 12:02:42 +02:00
Dmitry Stogov
c8d27777d6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78175 (Preloading segfaults at preload time and at runtime)
2019-06-18 17:19:19 +03:00
Dmitry Stogov
148eb20226
Fixed bug #78175 (Preloading segfaults at preload time and at runtime)
2019-06-18 17:18:49 +03:00
Dmitry Stogov
22b2d9d088
Fixed JIT failure, on ZTS build without global register vatriables
2019-06-18 13:52:52 +03:00
Joe Watkins
41067a22e9
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Turn system_id into a true global
2019-06-18 10:27:50 +02:00
Christoph M. Becker
04a6aac59b
Turn system_id into a true global
...
The system_id is identical for all threads and can be computed during
module startup, so there is no need to calculate and store it for each
thread.
2019-06-18 10:27:35 +02:00
Dmitry Stogov
7a236b6761
Attempt to fix JIT on Mac OSX ZTS build
2019-06-17 17:08:58 +03:00
Tyson Andre
38c0f6056b
zend_func_info: Remove null from methods with non-null return type
...
Detected by parsing the strings in zend_func_info.c, looping over them
and checking for inconsistencies with Reflection.
(new ReflectionFunction('str_shuffle')->getReturnType()) would be
a non-null 'string', for example.
- e.g. that change was made in 7393777da9
for php 8.0
Closes GH-4269.
2019-06-17 12:36:30 +02:00
Nikita Popov
4d90848d68
Don't verify arginfo types for internal functions
...
To avoid duplicate type checks. In debug builds arginfo is still
checked and will generate an assertions if the function doesn't
subsequently throw an exception.
Some test results change due to differences in zpp and arginfo
error messages.
2019-06-17 11:46:28 +02:00
Tyson Andre
74589cf676
Make opcache zend_func_info consistent with Reflection for ctype
...
This follows up with php 8.0 adding a real return type
(non-null bool) in 1409a3b153
2019-06-16 11:28:18 +02:00
Dmitry Stogov
96a6f7f7f5
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Backport 96a12578c1
2019-06-14 13:29:30 +03:00
Dmitry Stogov
28808ca96d
Backport 96a12578c1
2019-06-14 13:29:13 +03:00
Dmitry Stogov
a5b39abd86
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Backport 91a6cdbff5
2019-06-14 13:25:06 +03:00
Dmitry Stogov
40f463b560
Backport 91a6cdbff5
2019-06-14 13:24:47 +03:00
Dmitry Stogov
29902e0e46
Merge branch 'PHP-7.4'
...
* PHP-7.4:
More edge case fixes that may cause bug #78106
2019-06-14 13:10:39 +03:00
Dmitry Stogov
96a12578c1
More edge case fixes that may cause bug #78106
2019-06-14 13:10:02 +03:00
Dmitry Stogov
ca486893ba
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Attempt to fix edge conditions that may cause bug #78106
2019-06-14 12:48:00 +03:00
Dmitry Stogov
91a6cdbff5
Attempt to fix edge conditions that may cause bug #78106
2019-06-14 12:47:22 +03:00
Dmitry Stogov
5883dbcb18
Fixed incorect register allocation in ZTS build
2019-06-14 00:29:22 +03:00
Nikita Popov
026023bd71
Merge branch 'PHP-7.4'
2019-06-13 12:54:17 +02:00
Nikita Popov
e5be58f57c
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-13 12:54:10 +02:00
Nikita Popov
bada2049ca
Merge branch 'PHP-7.2' into PHP-7.3
2019-06-13 12:52:32 +02:00
Nikita Popov
f1a8138055
Fixed bug #78106
...
When disabling opcache during the request via opcache.enable ini
setting, make sure we also disable ZCG(accelerator_enabled).
2019-06-13 12:51:35 +02:00
Nikita Popov
b2b9c4785f
Merge branch 'PHP-7.4'
2019-06-13 12:41:14 +02:00
Nikita Popov
da275e6214
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-13 12:41:01 +02:00
Nikita Popov
ee137a7033
Merge branch 'PHP-7.2' into PHP-7.3
2019-06-13 12:38:57 +02:00
Nikita Popov
f8a68fd935
Add test for bug #78106
...
Also add PHP_TEST_EXTRA_ARGS environment variable, which allows
to pass on -c, -d etc flags provided by run-tests.php. Otherwise
we won't get the built-in server to run with opcache.
2019-06-13 12:35:29 +02:00
Nikita Popov
3b27689d46
Fix helper call on 32-bit
...
This is using the fast-call calling convention. Use FCARG1a and
same code for 32-bit and 64-bit.
2019-06-13 12:11:23 +02:00
Nikita Popov
792e38d863
Fix bug #78154 with JIT
2019-06-13 11:53:31 +02:00
Nikita Popov
51d82da6b0
Suppress -Wtautological-compare in dasc file
2019-06-13 09:59:42 +02:00
Nikita Popov
39034dbc67
Determine thread ID on macos
...
Also initialize the variable to 0 -- I don't think we really care
if this is not determine on some platform, but it should at least
not be uninitialized.
2019-06-13 09:59:42 +02:00
Nikita Popov
ff8002fc7c
Mark label as potentially unused
2019-06-12 16:47:48 +02:00
Nikita Popov
180b29a493
Merge branch 'PHP-7.4'
2019-06-11 15:41:13 +02:00
Nikita Popov
83e0bfb50c
Merge branch 'PHP-7.3' into PHP-7.4
2019-06-11 15:41:05 +02:00
Tyson Andre
5d3e3a62a2
Be more precise about possible types for mysqli methods
...
mysqli has an uncommon approach to 64-bit compatibility:
it will convert numbers that can't be represented on 32-bit
platforms to a string.
This is documented at
https://www.php.net/manual/en/mysqli-stmt.affected-rows.php#refsect1-mysqli-stmt.affected-rows-returnvalues
So if there's a query to a remote mysqli server that affects
more than 2.2 billion rows, then the opcache inference might be
incorrect.
(It's possible to add a MAY_BE_STRING_ON_32_BIT_PLATFORM bitflag macro to
account for this, but I don't think there's a need or want to?)
Patches 3162285b86
This is based on the list of php 7.4 functions using
MYSQLI_RETURN_LONG_INT in mysqli_api.c
2019-06-11 15:40:33 +02:00
Tyson Andre
07c63c6fdf
Fix opcache signatures for mysqli_stat
...
See mysqli_api.c and https://www.php.net/manual/en/mysqli.stat.php
2019-06-11 15:39:59 +02:00
Tyson Andre
7350e808c5
Fix bug in opcache flags for mysqli_get_charset
...
https://www.php.net/manual/en/mysqli.get-charset.php
tests/mysqli_field_seek.phpt has a test of this returning an object.
Looking at the source in ext/mysqli/mysqli_nonapi.c,
this should be object|null, not array|null
This might actually cause bugs in opcache's inferences,
(no proof of this)
so it might make sense to pull this patch into an earlier minor version.
2019-06-11 15:39:59 +02:00
Nikita Popov
e4fae9c061
Merge branch 'PHP-7.4'
2019-06-11 13:16:38 +02:00
Nikita Popov
89b2d88659
Register class before fetching parent
...
We want the class declaration to be available while compiling the
parent class.
2019-06-11 13:09:33 +02:00
Nikita Popov
7d98dd9c1c
Merge branch 'PHP-7.4'
2019-06-11 10:29:20 +02:00
Nikita Popov
eecd8961d9
Add get_mangled_object_vars() function
2019-06-11 10:28:29 +02:00
Tyson Andre
cdc82f19d8
Fix php 8.0's opcache flags for pathinfo()
...
See https://php.net/pathinfo
This fixes a bug introduced in the cleanup for commit
0d79c70cf3
`pathinfo($str, PATHINFO_EXTENSION)` will always return a string
(if there is no extension, the function returns the empty string)
2019-06-11 09:09:50 +02:00
Joe Watkins
678e3eb0b7
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix typo in opcache function flag info (mage->image)
2019-06-11 09:08:31 +02:00
Tyson Andre
5c8b702e77
Fix typo in opcache function flag info (mage->image)
...
ext/gd/gd.c seems to return null for wrong parameter count, false for
error, and long otherwise. See https://php.net/imagecolorallocate
In php 8.0, the MAY_BE_NULL can probably be removed.
2019-06-11 09:08:23 +02:00
Tyson Andre
cbaf37ff75
Delete opcache flags for php 8.0's removed mbereg*() aliases
...
See UPGRADING for Mbstring.
All of these are aliases of corresponding `mb_*`
functions that existed in php 7 but were removed in php 8.
Other functions such as gzgetss were already removed.
2019-06-11 09:07:42 +02:00
Joe Watkins
6c195fb846
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Clean up opcache func flags for set_socket_blocking
2019-06-11 09:06:48 +02:00
Tyson Andre
b921564a35
Clean up opcache func flags for set_socket_blocking
...
It was removed in php 7.0. See https://php.net/set_socket_blocking
2019-06-11 09:05:57 +02:00
Joe Watkins
0542eb5bd5
Rest of c3e78efecf
2019-06-11 09:05:07 +02:00
Tyson Andre
98b487e244
Fix a typo in opcache func info for "get_parrent_class"
...
This should only have one r.
http://php.net/get_parent_class mentions that it returns string|false
Also, I'm not 100% sure if this is right - should this include
MAY_BE_NULL to handle the case of too many parameters?
(then again, get_called_class() also returns null in the global scope)
```
php > var_export(get_parent_class(2,3));
Warning: get_parent_class() expects at most 1 parameter, 2 given in php
shell code on line 1
NULL
```
2019-06-11 08:59:12 +02:00
Dmitry Stogov
09a24d0b7c
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed possible misalignment in 32-bit build.
2019-06-10 12:53:34 +03:00
Dmitry Stogov
46df9a858c
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed possible misalignment in 32-bit build.
2019-06-10 12:53:04 +03:00
Dmitry Stogov
a0749fe483
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed possible misalignment in 32-bit build.
2019-06-10 12:52:50 +03:00
Dmitry Stogov
199eb2b110
Fixed possible misalignment in 32-bit build.
2019-06-10 12:51:59 +03:00
Nikita Popov
8b2741c1c3
Fix accidentially dropped type
...
I only meant to drop the MAY_BE_FALSE here, not the MAY_BE_ARRAY...
2019-06-06 10:07:59 +02:00
Nikita Popov
252216b2de
Remove possible false return value from get_object_vars()
...
I'm not sure this one ever happens in practice (and we might want
to forbid NULL return from get_properties), but if it does, return
an empty array instead of false.
2019-06-06 09:49:25 +02:00
Nikita Popov
001d434449
Finish func_info updates for ext/standard
2019-06-03 11:26:25 +02:00
Nikita Popov
fd911a7124
Expect string argument in hexdec, octdec, bindec
...
Instead of accepting zval and converting to string. Also rewrite the
functions to make it obvious that they cannot return false.
2019-06-03 11:26:25 +02:00
Nikita Popov
321fe88935
Add Z_PARAM_NUMBER and use it for some functions
2019-06-03 10:14:05 +02:00
Nikita Popov
673c70a4ba
A few more func info updates
2019-05-31 11:24:47 +02:00
Dmitry Stogov
b4a3b49eab
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Better hot/cold code splitting
2019-05-31 12:22:08 +03:00
Dmitry Stogov
1df9f238fe
Better hot/cold code splitting
2019-05-31 12:20:21 +03:00
Nikita Popov
0ba34824f5
Use TypeError instead of warning in implode()
...
These are again manual argument type checks.
2019-05-31 11:04:13 +02:00
Nikita Popov
45a0656e95
Remove get() object handler
...
Now that set() is gone, there is little point in keeping get(), as
it is essentially just a different way of writing cast_object()
now.
Closes GH-4202.
2019-05-29 17:15:19 +02:00
Nikita Popov
07fae1fd6e
escapeshellarg/escapeshellcmd: Throw TypeError instead of E_ERROR
2019-05-29 16:57:53 +02:00
Nikita Popov
0d239523a7
Merge branch 'PHP-7.4'
2019-05-29 16:48:37 +02:00
Nikita Popov
029b735a6e
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-29 16:48:28 +02:00
Nikita Popov
61a38bb274
SCCP: Fix leak when determining TYPE_CHECK from type info
...
As TYPE_CHECK is the only opcode where we do something like this,
I'm adding this hack.
2019-05-29 16:47:19 +02:00
Nikita Popov
a1a8d14485
Update more func info information for ext/standard
2019-05-29 15:30:06 +02:00
Nikita Popov
b7a6430a52
Don't JIT functions with many blocks
...
Avoids a stack overflow in Zend/tests/runtime_compile_time_binary_operands.php
that happens in recursive RPO calculation. We could make that code
non-recursive, but I don't think it makes sense to JIT this kind of
function in the first place.
2019-05-29 11:49:44 +02:00
Nikita Popov
4d1d5babde
Respect optimization_level when running JIT inference
...
Don't enable unsafe type inference by default -- we'll segfault on
some FFI tests.
2019-05-28 17:29:28 +02:00
Nikita Popov
e1c903230e
Merge branch 'PHP-7.4'
2019-05-28 16:41:30 +02:00
Nikita Popov
071b389bc6
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-28 16:41:17 +02:00
Nikita Popov
817b50826e
Merge branch 'PHP-7.2' into PHP-7.3
2019-05-28 16:41:08 +02:00
Nikita Popov
59dfaa3f99
Fix type inference of SEND_UNPACK with empty array
...
An empty array will not be turned into an array of references.
This violated the invariant than an array has values iff it has
keys.
2019-05-28 16:40:56 +02:00
Nikita Popov
0d744f78e6
Merge branch 'PHP-7.4'
2019-05-28 16:15:54 +02:00
Nikita Popov
f19dd674e0
SCCP: Fix handling of ASSIGN_OBJ_REF
...
The generic BOT handling is not away of OP_DATA, so need to handle
this opcode before we get to that.
2019-05-28 16:15:37 +02:00
Nikita Popov
8b3a71f904
Merge branch 'PHP-7.4'
2019-05-28 15:46:15 +02:00
Nikita Popov
6893f1f98e
SCCP: Don't perform partial object propagation for typed props
2019-05-28 15:46:03 +02:00
Nikita Popov
0bd1fc225d
JIT: Fix SWITCH_LONG/STRING codegen with exact type
...
We were not loading the operand if the type was known exactly.
2019-05-28 15:25:19 +02:00
Nikita Popov
7791784bc9
Revert accidental changes
...
These MAY_BE_FALSE should not have been dropped...
2019-05-28 13:14:58 +02:00
Nikita Popov
4da316d189
hebrev/hebrevc: Don't return false for empty string
...
There is nothing special about the empty string in this context,
we should pass it through unchanged.
2019-05-28 13:12:38 +02:00
Nikita Popov
0d79c70cf3
Update MAY_BE_NULL info for more ext/standard functions
2019-05-28 13:12:38 +02:00
Nikita Popov
d95c15e371
Update MAY_BE_NULL for parts of ext/standard
...
Also update proto comments to be more accurate.
2019-05-28 12:11:32 +02:00
Nikita Popov
1493c73582
Update MAY_BE_NULL func_info for Zend functions
...
These cannot return NULL anymore in PHP 8.
2019-05-28 11:43:23 +02:00
Dmitry Stogov
38c75f8fd3
Fixed register allocation
2019-05-28 12:39:13 +03:00
Nikita Popov
8126658444
Remove FUNC_MAY_WARN
...
We are no longer constructing the local symbol table when calling
error handlers since 2f1f34952e
,
which was the original motivation for having this information and
was used in an earlier version of the JIT.
2019-05-28 11:23:02 +02:00
Nikita Popov
bd4c9bce68
zend_func_info: Remove unnecessary type callbacks
...
In PHP 8 these functions will throw on invalid arguments, so there
is no need to distinguish the error cases.
2019-05-28 10:42:12 +02:00
Nikita Popov
a1284b4241
Remove special handling of zero-arg funcs in func_info
...
In PHP 8 we always throw on zpp failure, so we can always return the
type for the valid argument case only. We'll want to also adjust the
return type listings based on that (and drop MAY_BE_NULL/MAY_BE_FALSE
where possible).
2019-05-27 17:16:56 +02:00
Nikita Popov
45c663a9d3
Merge branch 'PHP-7.4'
2019-05-27 17:13:00 +02:00
Nikita Popov
fd23f9104a
BIND_STATIC of implicit binding may be undef
...
Even though we don't need it at runtime, add the BIND_IMPLICIT
flag to BIND_STATIC as well, so we can distinguish this case in
type inference.
This fixes a JIT miscompile in arrow_functions/002.phpt.
2019-05-27 17:12:20 +02:00
Nikita Popov
31ce1cbbb9
Func info: Fix calls to zero-arg varargs
...
The num_args does not include variadics, so a "zero-arg" function
may accept additional arguments through that. No functions seem
to be affected right now, but they will be after #4175 .
2019-05-27 16:14:51 +02:00
Nikita Popov
9d4c35e250
Merge branch 'PHP-7.4'
2019-05-27 16:14:25 +02:00
Nikita Popov
7cc17c4aac
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-27 16:14:16 +02:00
Nikita Popov
62f339c8d5
Func info: Fix calls to zero-arg varargs
...
The num_args does not include variadics, so a "zero-arg" function
may accept additional arguments through that. No functions seem
to be affected right now, but they will be after #4175 .
2019-05-27 16:12:42 +02:00
Dmitry Stogov
b22cd2284d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Align .text segment for better huge pages usage
2019-05-27 13:38:07 +03:00
Dmitry Stogov
62ded6efbc
Align .text segment for better huge pages usage
2019-05-27 13:37:19 +03:00
Jakub Zelenka
6166e2578e
Merge branch 'PHP-7.4'
2019-05-26 18:51:39 +01:00
Jakub Zelenka
cd6b7ebb68
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-26 18:51:10 +01:00
Jakub Zelenka
209b12e064
Merge branch 'PHP-7.2' into PHP-7.3
2019-05-26 18:49:52 +01:00
Jakub Zelenka
8baf3ffde6
Add fpmi to the opcache supported sapis
2019-05-26 18:47:22 +01:00
Nikita Popov
e06ec226bc
Merge branch 'PHP-7.4'
2019-05-24 09:33:58 +02:00
Nikita Popov
49a3b03e9f
Implement basic variance support
...
This is a minimal variance implementation: It does not support any
cyclic type dependencies. Additionally the preloading requirements
are much more restrictive than necessary. Hopefully we can relax
these in the future.
2019-05-24 09:30:37 +02:00
Dmitry Stogov
b63cb67421
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed double mutex unlock
2019-05-23 11:21:15 +03:00
Dmitry Stogov
fdb7fc6153
Fixed double mutex unlock
2019-05-23 11:20:46 +03:00
Nikita Popov
200f5b407e
Merge branch 'PHP-7.4'
2019-05-23 10:01:46 +02:00
Nikita Popov
dcccdc471d
Don't require NO_ESCAPE for partial arrays in SCCP
2019-05-23 09:59:25 +02:00
Dmitry Stogov
89a7e94f05
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed race condition in opcache restart
2019-05-23 00:21:26 +03:00
Dmitry Stogov
5de750f41c
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed race condition in opcache restart
2019-05-23 00:21:15 +03:00
Dmitry Stogov
d4867e099e
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed race condition in opcache restart
2019-05-23 00:21:04 +03:00
Dmitry Stogov
fa6a4483e6
Fixed race condition in opcache restart
2019-05-23 00:20:35 +03:00
Dmitry Stogov
26c348b3a5
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed dump of constant flags
2019-05-22 23:02:18 +03:00
Dmitry Stogov
fe1db0c3d7
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fixed dump of constant flags
2019-05-22 23:00:26 +03:00
Dmitry Stogov
aa9c76d027
Fixed dump of constant flags
2019-05-22 22:59:40 +03:00
Dmitry Stogov
3a76ef3d5d
Merge branch 'PHP-7.4'
...
* PHP-7.4:
.text segment may be not the first one
2019-05-22 12:21:07 +03:00
Dmitry Stogov
7c99589be2
.text segment may be not the first one
2019-05-22 12:20:34 +03:00
Nikita Popov
c06f07f55b
Merge branch 'PHP-7.4'
2019-05-22 09:35:49 +02:00
Nikita Popov
ff4b0ce0e8
Fix bug #78034
...
Don't def non-cv variables in assign_obj_ref data operand.
2019-05-22 09:35:38 +02:00
Nikita Popov
69517d037b
Merge branch 'PHP-7.4'
2019-05-21 17:35:33 +02:00
Nikita Popov
f260c0918f
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-21 17:35:28 +02:00
Nikita Popov
97ba6b0d8b
Don't evaluate functions with partial array arguments
2019-05-21 17:35:03 +02:00
Nikita Popov
dda0ae3e59
Merge branch 'PHP-7.4'
2019-05-21 17:18:01 +02:00
Nikita Popov
436a47428b
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-21 17:17:45 +02:00
Nikita Popov
30f1b17262
Fix null check in sccp add_array_elem chain handling
...
We need to check result_use rather than result_def for a null zval.
Previously we were later assuming that the null zval is really a
partial array, which does not go well.
2019-05-21 17:15:07 +02:00
Nikita Popov
4c5f83f644
Merge branch 'PHP-7.4'
2019-05-21 17:04:17 +02:00
Nikita Popov
a87448bb55
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-21 17:03:52 +02:00
Nikita Popov
fc4836b193
Fix partial array handling in FE_RESET edge feasibility
2019-05-21 16:59:27 +02:00
Nikita Popov
cd188d0398
Handle partial arrays in zend_is_true() checks
2019-05-21 16:53:34 +02:00
Nikita Popov
bdce5849b7
Extract ct_eval_binary_op()
...
And use it in more places, though some of them are currently not
reachable by partial arrays to the best of my knowledge.
2019-05-21 16:43:41 +02:00
Nikita Popov
367788cbc3
Improve SCCP debug code
...
In particular properly dump partial arrays when tracing execution.
2019-05-21 16:42:13 +02:00
Christoph M. Becker
68e6c1542e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix ASLR related invalid opline handler issues
2019-05-21 14:34:55 +02:00
Christoph M. Becker
8ba10b8fbc
Fix ASLR related invalid opline handler issues
...
Opcache stores `opline->handler`s in shared memory. These pointers are
invalid, if the main PHP DLL is loaded at another base address due to
ASLR. We therefore store the address of `execute_ex` in the mmap base
file, and check on startup whether it matches its current address. If
not, we fall back on the file cache if enabled, and bail out otherwise.
This still does not address cases where the opline handler is located
inside of another DLL (e.g. for some profilers, debuggers), but there
seems to be no general solution for now.
2019-05-21 14:33:33 +02:00
Christoph M. Becker
5e0bcd24f4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Prevent test case failure
2019-05-21 11:19:35 +02:00
Christoph M. Becker
ee9908683b
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Prevent test case failure
2019-05-21 11:19:05 +02:00
Christoph M. Becker
d23bc33dc1
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Prevent test case failure
2019-05-21 11:18:32 +02:00
Christoph M. Becker
e6a191de1b
Prevent test case failure
...
If opcache.log_verbosity_level is greater than 1, opcache will raise
warnings, which will be written to stderr in the default case. These
warnings are actually to be expected, but would break the test, so we
make sure that the log_verbosity_level is 1 when running this test.
2019-05-21 11:17:51 +02:00
Christoph M. Becker
77f02cda53
Merge branch 'PHP-7.4'
...
* PHP-7.4:
use {TMP} placeholder in phpt tests
2019-05-21 09:03:51 +02:00
Christoph M. Becker
c982a4c3f9
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
use {TMP} placeholder in phpt tests
2019-05-21 09:03:20 +02:00
Christoph M. Becker
11740abd6b
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
use {TMP} placeholder in phpt tests
2019-05-21 09:03:01 +02:00
Holly Li (WIPRO LIMITED)
202e6936d6
use {TMP} placeholder in phpt tests
2019-05-21 09:02:37 +02:00
Dmitry Stogov
83b12d5b57
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Prevent race condition in opcache_reset()
2019-05-21 00:08:22 +03:00
Dmitry Stogov
e2f8d906cf
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Prevent race condition in opcache_reset()
2019-05-21 00:08:12 +03:00
Dmitry Stogov
354a76bb80
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Prevent race condition in opcache_reset()
2019-05-21 00:08:03 +03:00
Dmitry Stogov
a8a019d68a
Prevent race condition in opcache_reset()
2019-05-21 00:07:17 +03:00
Dmitry Stogov
1e10c06f20
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fixed bug #78014 (Preloaded classes may depend on non-preloaded classes due to unresolved consts)
2019-05-20 18:16:01 +03:00
Dmitry Stogov
f53b9939fe
Fixed bug #78014 (Preloaded classes may depend on non-preloaded classes due to unresolved consts)
2019-05-20 18:15:38 +03:00
Christoph M. Becker
ad0e58abf4
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test wrt. opcache.error_log
2019-05-20 11:11:39 +02:00
Christoph M. Becker
5f1d76a2c4
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix test wrt. opcache.error_log
2019-05-20 11:11:06 +02:00
Christoph M. Becker
db8ef71353
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix test wrt. opcache.error_log
2019-05-20 11:10:20 +02:00
Christoph M. Becker
64ec9f4dbe
Fix test wrt. opcache.error_log
...
Since the test expects log messages to be written to stderr, we have to
make sure that opcache.error_log is set correctly when running the
test.
2019-05-20 11:09:44 +02:00
Nikita Popov
6b15163369
Merge branch 'PHP-7.4'
2019-05-15 14:36:53 +02:00
Nikita Popov
806db1a793
Merge branch 'PHP-7.3' into PHP-7.4
2019-05-15 14:36:45 +02:00
Nikita Popov
9d76fbd0c4
Fixed bug #78015
...
Don't try to evaluate various operations with partial array operands.
We could evaluate some of these, but let's be conservative for now...
2019-05-15 14:35:31 +02:00
Dmitry Stogov
4d8e0d493a
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Moved NEWS entry
Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
2019-05-14 15:09:30 +03:00
Dmitry Stogov
7bc4bd0229
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Moved NEWS entry
Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
2019-05-14 15:09:17 +03:00
Dmitry Stogov
a43678aa12
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
2019-05-14 14:54:30 +03:00
Dmitry Stogov
5c4d125d4c
Fixed possible crashes, because of inconsistent PCRE cache and opcache SHM reset
2019-05-14 14:53:52 +03:00
Nikita Popov
f106f57164
Merge branch 'PHP-7.4'
2019-05-13 14:43:10 +02:00
CHU Zhaowei
e829d08729
Implement spread operator in arrays
...
RFC: https://wiki.php.net/rfc/spread_operator_for_array
Closes GH-3640.
2019-05-13 14:42:43 +02:00
Peter Kokot
2cf90bb2f0
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Normalize comments in *nix build system m4 files
2019-05-12 18:51:50 +02:00
Peter Kokot
75fb74860d
Normalize comments in *nix build system m4 files
...
Normalization include:
- Use dnl for everything that can be ommitted when configure is built in
favor of the shell comment character # which is visible in the output.
- Line length normalized to 80 columns
- Dots for most of the one line sentences
- Macro definitions include similar pattern header comments now
2019-05-12 18:43:03 +02:00
Christoph M. Becker
206a3e96a6
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix log_verbosity_bug.phpt
2019-05-09 12:16:48 +02:00
Christoph M. Becker
9840a11117
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix log_verbosity_bug.phpt
2019-05-09 12:16:16 +02:00
Christoph M. Becker
e46b3c3e70
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix log_verbosity_bug.phpt
2019-05-09 12:15:32 +02:00
Christoph M. Becker
e359812ce3
Fix log_verbosity_bug.phpt
...
This test may fail on Windows due to the file cache fallback. We
ensure that this will not happen.
2019-05-09 12:15:00 +02:00
Dmitry Stogov
66a1d821d3
Improved code for unordered comparison
2019-05-06 16:07:48 +03:00
Dmitry Stogov
fc42ac2d78
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use ZEND_HASH_FOREACH with direct callback, instead of callbacks
2019-04-30 14:50:38 +03:00
Dmitry Stogov
ec5f7df732
Use ZEND_HASH_FOREACH with direct callback, instead of callbacks
2019-04-30 14:50:01 +03:00
Christoph M. Becker
bb3f261839
Merge branch 'PHP-7.4'
...
* PHP-7.4:
fix typo
2019-04-30 09:18:48 +02:00
蝦米
e4ed2bf922
fix typo
2019-04-30 09:18:17 +02:00