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

115024 Commits

Author SHA1 Message Date
Nikita Popov ade97c207c Merge branch 'PHP-7.4' 2019-08-26 16:12:47 +02:00
Nikita Popov e2b49d6c45 Don't use needs_live_range hook for "special" live ranges
In particular we were disgarding SILENCE live ranges in opcache,
because we decided that a MAY_BE_LONG type does not need a live
range.
2019-08-26 16:12:03 +02:00
Christoph M. Becker 0ab4fca8e3 Add ext\opcache stubs 2019-08-26 16:05:01 +02:00
Burak Çakırel d2210dc2ea Add assert arginfo stubs
Closes GH-4619.
2019-08-26 15:41:31 +02:00
Nikita Popov a98307df87 Make arginfo printing of prefer-ref arguments nicer 2019-08-26 15:39:39 +02:00
Christoph M. Becker e047e9d893 Add ext/ffi stubs 2019-08-26 15:25:27 +02:00
Nikita Popov 0c2d4d698c Make sure that params with null default are marked nullable 2019-08-26 14:34:28 +02:00
Nikita Popov a47f170a75 Assert that symbol table is available in compact()
I believe NULL here is no longer possible due to the dynamic call
check. A similar assumption already exists in the extract()
implementation.
2019-08-26 14:25:48 +02:00
Christoph M. Becker 99c57b33cf Merge branch 'PHP-7.4'
* PHP-7.4:
  Replace deprecated libzip functions
2019-08-26 14:06:08 +02:00
Christoph M. Becker 8f897f1040 Replace deprecated libzip functions
We replace all deprecated libzip functions with their recommended
substitutes, and add proper comment length checks including a test
case.
2019-08-26 14:05:28 +02:00
George Peter Banyard c1c8538f95 Promote warnings to errors in array_rand() 2019-08-26 13:31:02 +02:00
Nikita Popov 0038db2251 Avoid duplicate "non well-formed" warning
The arginfo checking code for internal functions should not generate
this warning, as it will be thrown by zpp.
2019-08-26 13:16:02 +02:00
Theodore Brown d5f42d68c8 Convert remaining array function arginfo to PHP stubs 2019-08-26 12:53:00 +02:00
viest 48040cf345 Remove deprecated getaddrinfo flags
The AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES have
been deprecated by glibcs, and PHP 7.4 follows this deprecation.

This removes the offending flags for PHP 8.0.
2019-08-26 11:45:31 +02:00
George Peter Banyard 91f4e2e614 Promote warnings to errors in explode() 2019-08-26 11:35:03 +02:00
Nikita Popov 06a4a9ba42 Merge branch 'PHP-7.4' 2019-08-26 11:33:38 +02:00
viest 5703943081 Deprecate AI_IDN_ALLOW_UNASSIGNED and AI_IDN_USE_STD3_ASCII_RULES
These flags have been deprecated in glibc 2.28, so we also
deprecate them in PHP.

As we can't deprecate constants, we can only check for their use
in socket_addrinfo_lookup().
2019-08-26 11:33:18 +02:00
Nikita Popov e57034a89b Merge branch 'PHP-7.4' 2019-08-26 11:15:18 +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 e28cb9d04e Merge branch 'PHP-7.4' 2019-08-26 11:10:07 +02:00
Nikita Popov 9483c50772 Fixed bug #78456 2019-08-26 11:08:42 +02:00
Nikita Popov 4c70a585b7 Merge branch 'PHP-7.4' 2019-08-26 10:28:14 +02:00
Nikita Popov bad49e55b9 Merge branch 'PHP-7.3' into PHP-7.4 2019-08-26 10:27:08 +02:00
Nikita Popov a26f63213d Merge branch 'PHP-7.2' into PHP-7.3 2019-08-26 10:26:49 +02:00
Nikita Popov 16d35eb643 Fix overflow in memory limit checks
Due to overflows in the memory limit checks, we were missing cases
where the allocation size was close to the address space size, and
caused an OOM condition rather than a memory limit error.
2019-08-26 10:25:30 +02:00
Stanislav Malyshev 5a77831a53 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix test
2019-08-25 20:06:50 -07:00
Stanislav Malyshev c810d3d6ad Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix test
2019-08-25 20:06:43 -07:00
Stanislav Malyshev d1646e328a Fix test
Not sure why offset changed... probably different PCRE version calculates
them in different way.
2019-08-25 20:06:02 -07:00
Stanislav Malyshev c176c666e3 Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:13 -07:00
Stanislav Malyshev 9f269d0d27 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:08 -07:00
Stanislav Malyshev 5d25ebb0dd Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:21:04 -07:00
Stanislav Malyshev 4b4a656d9e Merge branch 'PHP-7.1' into PHP-7.2
* PHP-7.1:
  Fix #75457: heap-use-after-free in php7.0.25
2019-08-25 19:20:59 -07:00
Christoph M. Becker 7bf1f9d561 Fix #75457: heap-use-after-free in php7.0.25
Backport <https://vcs.pcre.org/pcre?view=revision&revision=1638>.
2019-08-25 19:19:50 -07:00
Christoph M. Becker c8ec166cda Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix #78454: Consecutive numeric separators cause OOM error
2019-08-25 22:46:55 +02:00
Theodore Brown 1a78bdab27 Fix #78454: Consecutive numeric separators cause OOM error
Resolves out of memory error when consecutive numeric separators follow a binary/hex literal.
2019-08-25 22:46:18 +02:00
George Peter Banyard 743729d5bf Promote warnings to errors in str_pad() 2019-08-25 20:13:27 +02:00
Christoph M. Becker 6cd821b2d1 Merge branch 'PHP-7.4'
* PHP-7.4:
  Don't modify arrays passed by value
2019-08-25 18:29:08 +02:00
Christoph M. Becker ac40d0ffbc Don't modify arrays passed by value 2019-08-25 18:27:35 +02:00
Christoph M. Becker 64d0416a72 Add ext/gmp stubs 2019-08-25 17:56:39 +02:00
Nikita Popov 6e3135070c Remove unnecessary haystack length check in stripos()
This falls out naturally from the following condition, because
either the needle length will be zero as well, or the needle
will be longer than the (empty) haystack.
2019-08-25 16:31:15 +02:00
Nikita Popov 4346d1b0e6 Remove unnecessary NULL check
needle_dup cannot be NULL here.
2019-08-25 16:30:16 +02:00
Nikita Popov d955ee9f6b Make string size calculation in chunk_split more precise
The +1 on the string length is unnecessary, as we need the string
length without trailing NUL byte here.

The +1 on the chunks is only necessary if there is a rest. If the
string devides into chunks exactly, we don't need an extra chunk.

This makes the allocations exactly as large as it needs to be.
2019-08-25 15:34:37 +02:00
Olumide Samson b9c961e160 Add some header and html function stub 2019-08-25 15:27:58 +02:00
Christoph M. Becker 4742b2e1de Add stubs for ext/ftp 2019-08-25 14:56:45 +02:00
Nikita Popov 3602fea659 Skip memory_limit test without ZMM 2019-08-25 09:38:49 +02:00
Stanislav Malyshev 511faf7435 Merge branch 'PHP-7.4'
* PHP-7.4:
  Update Oniguruma to 6.9.1
2019-08-25 00:21:23 -07:00
Stanislav Malyshev beb7a0039b Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Update Oniguruma to 6.9.1
2019-08-25 00:20:40 -07:00