Commit Graph

2401 Commits

Author SHA1 Message Date
Nikita Popov
4d8541debb Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fixed bug #78747
2019-10-25 12:50:26 +02:00
Nikita Popov
74699533e5 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fixed bug #78747
2019-10-25 12:50:12 +02:00
Nikita Popov
5249993814 Fixed bug #78747 2019-10-25 12:47:18 +02:00
Nikita Popov
6aece7be0a Optimize VERIFY_RETURN_TYPE for TMP operands as well
Only exclude CONST operands, which use a different instruction
format (they have a return operand).
2019-10-25 11:37:19 +02:00
Nikita Popov
f07565b0eb Check class linking in VERIFY_RETURN_TYPE optimization
instanceof_function() requires linked classes. I'm not reusing
unlinked_instanceof() here, because it performs class loading,
which wouldn't be right here, I think.
2019-10-25 11:24:32 +02:00
Dmitry Stogov
1417352dda Allow loading FFI bindings through ffi.preload directive 2019-10-22 17:52:56 +03:00
Dmitry Stogov
05c5e5dfde Fixed bug #78512 (Cannot make preload work) 2019-10-21 14:52:26 +03:00
Joe Watkins
042e3b227e
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix checksum calculation for opcache
2019-10-14 16:50:23 +02:00
Joe Watkins
22ac57b064
Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix checksum calculation for opcache
2019-10-14 16:49:48 +02:00
Mitch Hagstrand
e2a6bf482f
Fix checksum calculation for opcache 2019-10-14 16:46:42 +02:00
Remi Collet
e1362b3cf0 add librt for opcache 2019-10-08 10:48:10 +02:00
Nikita Popov
a6c9c7c2b8 Handle resources used as array keys consistently
Resources used as array keys are generally handled by throwing a
notice and converting the resource to the resource handle. The only
exception is the [$resource => null] syntax, where this was treated
as an illegal offset type instead. However, this also only happened
for VM evaluations, the AST evaluator did handle resources correctly.
2019-09-27 10:40:41 +02:00
Nikita Popov
5bee9c9062 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-19 17:22:28 +02:00
Nikita Popov
85e7668129 Merge branch 'PHP-7.2' into PHP-7.3 2019-09-19 17:21:45 +02:00
Nikita Popov
003c13d7bc Fix iterable return type optimization 2019-09-19 17:21:00 +02:00
Nikita Popov
62b440ffbb Merge branch 'PHP-7.3' into PHP-7.4 2019-09-17 12:09:06 +02:00
Nikita Popov
f98684b06c Merge branch 'PHP-7.2' into PHP-7.3 2019-09-17 12:08:57 +02:00
Tyson Andre
29bced9521 Fix opcache return type for get_headers in zend_func_info
https://www.php.net/manual/en/function.get-headers.php#refsect1-function.get-headers-examples
shows that it will return string keys when the second argument is
non-zero. I've verified that this is the case.

This bug was there since the initial commit in c88ffa9a56.

Closes GH-4702.
2019-09-17 12:08:29 +02:00
Christoph M. Becker
20f73d3d8f Fix #78429: opcache_compile_file(__FILE__); segfaults
We have to ensure that OPcache has been properly started up when
`opcache_compile_file()` is called.
2019-09-16 16:01:09 +02:00
Dmitry Stogov
af9b127fed Make constant and copy propagation only for IS_TMP_VAR operands 2019-09-13 12:38:57 +03:00
Nikita Popov
4b9ebd837b Allow throwing exception while loading parent class
This is a fix for symfony/symfony#32995.

The behavior is:

* Throwing exception when loading parent/interface is allowed
  (and we will also throw one if the class is simply not found).
* If this happens, the bucket key for the class is reset, so
  it's possibly to try registering the same class again.
* However, if the class has already been used due to a variance
  obligation, the exception is upgraded to a fatal error, as we
  cannot safely unregister the class stub anymore.
2019-09-12 16:41:18 +02:00
Nikita Popov
0a24cd4e7c Preloading: Fix handling of static vars in inherited methods
Part of bug #78512.
2019-09-11 09:53:10 +02:00
Tyson Andre
3e89e9a636 Add opcache return type for random_int()
random_int() will throw for incorrect argument counts, types (e.g. float
that can't cast to int), or having min > max.

See ext/standard/random.c
2019-09-09 17:19:04 +02:00
Tyson Andre
45e529d673 Fix opcache zend_func_info for microtime/gettimeofday
microtime() doesn't return an array,
and gettimeofday() doesn't return a string.
See _php_gettimeofday in microtime.c (mode is non-zero for gettimeofday)
2019-09-09 17:13:19 +02:00
Nikita Popov
36a8cf5182 Fixed bug #78514
The property class may have already been translated as part of
some other class. Only translate if xlat returns non-null.
2019-09-09 11:36:50 +02:00
Tyson Andre
94e2f25f07 Add missing opcache return types for functions in spl
(excluding spl_autoload)

spl_object_id() is of the most interest to me,
since I frequently call it in an application.

This includes false/null types caused by wrong argument types and wrong argument
counts.

I can't rule out iterator_to_array returning null in spl_iterator_apply,
so leave MAY_BE_NULL in.

With review comments by nikic:
Co-Authored-By: Nikita Popov <nikita.ppv@googlemail.com>
2019-09-04 11:12:41 +02:00
Dmitry Stogov
5dc37cc306 Execute preload script under user defined by opcache.preload_user directive 2019-09-03 14:23:13 +03:00
Tyson Andre
4de8503c22 Add missing opcache return info for ext/standard.
array_key_first/last returns null for invalid args,
wrong argument counts, and empty arrays.

random_bytes returns a string or throws.
2019-09-03 09:57:51 +02:00
Tyson Andre
1a905bcb1e Add new missing functions from ext/hash 2019-09-03 09:53:41 +02:00
Nikita Popov
632708ac02 Merge branch 'PHP-7.3' into PHP-7.4 2019-09-03 09:24:05 +02:00
Nikita Popov
d66e0f165d Merge branch 'PHP-7.2' into PHP-7.3 2019-09-03 09:23:55 +02:00
Tyson Andre
9c3b7ccda5 Fix opcache return type for hash_update_stream
It can return false if the resource type is wrong.

```
php > var_export(hash_update_stream(hash_init('md5'),
        imagecreate(1,1)));

Warning: hash_update_stream(): supplied resource is not a valid stream
resource in php shell code on line 1
false
```

The return types were initially added in
c88ffa9a56
2019-09-03 09:23:39 +02:00
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
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
ef35556498 typo 2019-08-06 13:58:17 +03:00
Dmitry Stogov
d5d76ea6e7 Preloading is not comatible with dl() function 2019-08-06 12:44:55 +03:00
Dmitry Stogov
3fc0e2bb80 Fixed bug #78376 (Incorrect preloading of constant static properties) 2019-08-05 22:55:06 +03:00
Nikita Popov
bf53d30fae Fix forwarding of extra args in opcache server tests 2019-08-01 17:00:11 +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
a9e332e027 Handle RW UNPACK in inference 2019-07-30 10:31:51 +02:00
Christoph M. Becker
3429370d69 Fix build for --disable-signals 2019-07-29 18:49:44 +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
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
b3f74b0b7d Deprecate allow_url_include 2019-07-22 11:39:52 +02: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
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
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
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
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
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
a6812c0c84 Provide type info 2019-07-16 22:56:20 +03: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
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
e08cc4d921 Remove ZEND_HANDLE_FD
This handle type was unused.
2019-07-16 15:47:10 +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
17f7fb7605 Switch to using shell-less proc_open() in various server tests 2019-07-11 15:48:10 +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
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
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
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
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
24ecfcc833 Add test
Forgot to commit this.
2019-07-05 11:00:27 +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
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
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
df243f19be Preloading: Prevent autoloading while resolving constants 2019-07-04 11:05:01 +02:00
Nikita Popov
f857648270 Improve unlinked class diagnostics during preloading 2019-07-03 14:05:10 +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
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
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
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
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
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
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
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
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
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
ca6f41aa5a Fix out of bounds read in sccp 2019-06-28 14:47: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
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
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
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
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
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
0f29fb5cd8 Fixed bug 78175 (Preloading must store default values of static variables and properties) 2019-06-24 20:32:27 +03: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
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
Christoph M. Becker
ecae9100dc Rename test file to reflect the appropriate ticket number 2019-06-20 16:54:17 +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
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
e162a1c02e Fix maybe uninit warning 2019-06-20 10:35:22 +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
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
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
Dmitry Stogov
148eb20226 Fixed bug #78175 (Preloading segfaults at preload time and at runtime) 2019-06-18 17:18:49 +03: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
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
96a12578c1 More edge case fixes that may cause bug #78106 2019-06-14 13:10:02 +03:00
Dmitry Stogov
91a6cdbff5 Attempt to fix edge conditions that may cause bug #78106 2019-06-14 12:47:22 +03: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
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
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