]>
granicus.if.org Git - php/log
Máté Kocsis [Sun, 16 Aug 2020 19:49:20 +0000 (21:49 +0200)]
Improve error messages mentioning parameters instead of arguments
Closes GH-5999
Dmitry Stogov [Wed, 9 Sep 2020 08:09:20 +0000 (11:09 +0300)]
Fixed memory leak
Nikita Popov [Wed, 9 Sep 2020 08:01:32 +0000 (10:01 +0200)]
Wildcard output differences in snmp tests
And point out that snmp-mibs-downloader is needed.
Dmitry Stogov [Wed, 9 Sep 2020 07:35:44 +0000 (10:35 +0300)]
Tracin JIT support for FETCH_DIM_W/RW with IS_VAR + IS_INDIRECT first operand.
Nikita Popov [Tue, 8 Sep 2020 14:55:48 +0000 (16:55 +0200)]
Avoid use of remote_port in snmp
This field is not used (and has not been used for a long time --
I've seen some mailing list thread from 2003 about it!) and throws
a deprecation warning. The port is part of peername instead (for
transports that support a port at all).
Nikita Popov [Wed, 9 Sep 2020 07:29:18 +0000 (09:29 +0200)]
Pass correct op_info to zend_jit_fetch_dim()
twosee [Fri, 4 Sep 2020 14:43:02 +0000 (22:43 +0800)]
Flesh out ZEND_HASH_REVERSE_FOREACH_* macros
Closes GH-6080.
Christopher Jones [Wed, 9 Sep 2020 01:28:00 +0000 (11:28 +1000)]
Fix
3b0fecd and resulting test fail lob_012.phpt
Dmitry Stogov [Tue, 8 Sep 2020 23:41:22 +0000 (02:41 +0300)]
JIT for FETCH_DIM_W/RW insructions
Christoph M. Becker [Tue, 8 Sep 2020 20:51:46 +0000 (22:51 +0200)]
Fix Windows build for shared ext/sockets
We can't use `PHPAPI` for extensions which may be built shared. Thus,
we introduce `PHP_SOCKETS_API`.
Nikita Popov [Tue, 8 Sep 2020 18:42:45 +0000 (20:42 +0200)]
Don't handle missing value in zend_verify_arg_error()
This error condition is handled separately, never reaches this
function.
Alex Dowad [Tue, 8 Sep 2020 18:09:44 +0000 (20:09 +0200)]
mb_str_split is already documented on php.net
So remove TODO comment which implies that it's not.
Dmitry Stogov [Tue, 8 Sep 2020 18:03:51 +0000 (21:03 +0300)]
JIT for IN_ARRAY instruction.
Christoph M. Becker [Tue, 8 Sep 2020 16:11:26 +0000 (18:11 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #72941: Modifying bucket->data by-ref has no effect any longer
Christoph M. Becker [Tue, 8 Sep 2020 16:07:57 +0000 (18:07 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #72941: Modifying bucket->data by-ref has no effect any longer
Christoph M. Becker [Tue, 8 Sep 2020 13:09:30 +0000 (15:09 +0200)]
Fix #72941: Modifying bucket->data by-ref has no effect any longer
To match the PHP 5 behavior, we have to explicitly cater to `buffer` or
`data` being references.
Closes GH-6096.
Nikita Popov [Tue, 8 Sep 2020 15:37:40 +0000 (17:37 +0200)]
Try to fix 32-bit setcookie tests, again
Remi Collet [Tue, 8 Sep 2020 12:46:23 +0000 (14:46 +0200)]
add socket_ce and socket_import_file_descriptor in public API
Nikita Popov [Tue, 8 Sep 2020 15:01:08 +0000 (17:01 +0200)]
Fix some snmp stubs
As well as some basic mistakes in tests.
Nikita Popov [Tue, 8 Sep 2020 14:50:10 +0000 (16:50 +0200)]
Suppress unused variable in snmp
force_ipv6 may be unused if compiling without ipv6 support.
Nikita Popov [Tue, 8 Sep 2020 14:29:01 +0000 (16:29 +0200)]
Run the opcache-only configuration only for scheduled builds
The opcache-only configuration has very little signal (i.e. it is
very rare that it fails while non-opcache and opcache+jit both
pass). Switch it to run only for nightly builds, so we get faster
results on normal builds.
Nikita Popov [Tue, 8 Sep 2020 14:18:45 +0000 (16:18 +0200)]
Try to fix setcookie() tests on 32-bit
Dmitry Stogov [Tue, 8 Sep 2020 13:47:30 +0000 (16:47 +0300)]
micro-optimization
Dmitry Stogov [Tue, 8 Sep 2020 13:47:15 +0000 (16:47 +0300)]
JIT for FETCH_LIST_R
Máté Kocsis [Mon, 7 Sep 2020 15:38:14 +0000 (17:38 +0200)]
Fix UNKNOWN default values in ext/oci8
Closes GH-6089
Nikita Popov [Tue, 8 Sep 2020 10:12:26 +0000 (12:12 +0200)]
Make null byte error a ValueError
Currently we treat paths with null bytes as a TypeError, which is
incorrect, and rather inconsistent, as we treat empty paths as
ValueError. We do this because the error is generated by zpp and
it's easier to always throw TypeError there.
This changes the zpp implementation to throw a TypeError only if
the type is actually wrong and throw ValueError for null bytes.
The error message is also split accordingly, to be more precise.
Closes GH-6094.
Nikita Popov [Tue, 8 Sep 2020 13:01:17 +0000 (15:01 +0200)]
Always use PCRE for mbstring.http_output_conv_mimetypes
Instead of using either oniguruma or pcre depending on which is
available. We always have PCRE, so use it. This ensures consistent
behavior.
George Peter Banyard [Tue, 7 Jul 2020 16:59:05 +0000 (18:59 +0200)]
Promote warnings to errors for set(raw)cookie()
Closes GH-5819
Nikita Popov [Tue, 8 Sep 2020 12:22:32 +0000 (14:22 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Support more placeholders in bless_tests.php
Nikita Popov [Tue, 8 Sep 2020 10:16:31 +0000 (12:16 +0200)]
Support more placeholders in bless_tests.php
And don't replace trailing --CLEAN-- sections.
Nikita Popov [Tue, 8 Sep 2020 09:06:49 +0000 (11:06 +0200)]
Require $method parameter in openssl_seal/openssl_open
RC4 is considered insecure, and it's not possible to change the
default of these functions. As such, require the method to be
passed explicitly.
Closes GH-6093.
Nikita Popov [Tue, 8 Sep 2020 09:50:25 +0000 (11:50 +0200)]
Promote warnings in exif
The only thing that can promoted are the path-related checked.
Everything else is input dependent and error-suppressing these
functions is both the typical and the recommended usage.
Nikita Popov [Tue, 8 Sep 2020 08:28:07 +0000 (10:28 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Revert "Update libzip on macos"
Revert "Manually build re2c on macos"
Nikita Popov [Tue, 8 Sep 2020 07:51:55 +0000 (09:51 +0200)]
Revert "Update libzip on macos"
This reverts commit
090bddb93488b6bcf411e970afe77d96f86f4ac8 .
Nikita Popov [Tue, 8 Sep 2020 07:49:19 +0000 (09:49 +0200)]
Revert "Manually build re2c on macos"
This reverts commit
9bbe236f6adead060d83c87a581674f4917db3de .
Nikita Popov [Tue, 8 Sep 2020 08:01:27 +0000 (10:01 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #80077
Nikita Popov [Tue, 8 Sep 2020 08:01:03 +0000 (10:01 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #80077
Nikita Popov [Tue, 8 Sep 2020 07:58:35 +0000 (09:58 +0200)]
Fixed bug #80077
Quoting from the bug report:
> The domain names passed to getmxrr() do not contain a trailing dot.
> DNS lookups which do not find records will (depending on the local
> resolver config) try again by adding the local domain to the end of
> the searched host/domain. In many environments there's an mx record
> for any subdomain of the local domain and the MX query will return
> a hit. But the test expects no hit. So the test fails when checking
> that "qa.php.net" does not have an MX record in DNS. In our local
> environment the resolver falls back to also check qa.php.net.kippdata.de
> which does have an MX record. Using "qa.php.net." instead of "qa.php.net"
> should fix this for everyone.
Dmitry Stogov [Tue, 8 Sep 2020 07:34:29 +0000 (10:34 +0300)]
decbin/decoct/dechex optimization.
Christopher Jones [Tue, 8 Sep 2020 06:49:54 +0000 (16:49 +1000)]
Catch type errors so test completes and doesn't diff
Christopher Jones [Tue, 8 Sep 2020 06:06:33 +0000 (16:06 +1000)]
Accept updated error number generated by the latest Oracle version
Christopher Jones [Tue, 8 Sep 2020 05:56:26 +0000 (15:56 +1000)]
Yes, and mask the dir path too.
Christopher Jones [Tue, 8 Sep 2020 05:48:48 +0000 (15:48 +1000)]
Fix parsing regression from PHP 7
Ilija Tovilo [Sat, 5 Sep 2020 14:33:22 +0000 (16:33 +0200)]
Adjust assignment line number for match
Otherwise the assignment will have the same number as the default arm
which will 1. mis-trigger a breakpoint and 2. mark the line as covered
even when it isn't.
Closes GH-6083
Nikita Popov [Mon, 7 Sep 2020 20:57:09 +0000 (22:57 +0200)]
Reduce input size limit in execute fuzzer
We only have 4 Zend test cases > 8k. Large inputs tend to just
make things slower.
Dmitry Stogov [Mon, 7 Sep 2020 18:35:48 +0000 (21:35 +0300)]
Add "const". Move constant strings to read-only memory.
Máté Kocsis [Mon, 10 Aug 2020 21:23:35 +0000 (23:23 +0200)]
Promote warnings to exceptions in ext/intl
Closes GH-5972
Nikita Popov [Mon, 7 Sep 2020 17:06:53 +0000 (19:06 +0200)]
Don't allow dynamic properties on generators
Noticed this because we leak those properties in GC. This was
never intended to be allowed.
Máté Kocsis [Fri, 4 Sep 2020 12:01:09 +0000 (14:01 +0200)]
Fix UNKNOWN default values in various extensions
Closes GH-6075
Máté Kocsis [Thu, 20 Aug 2020 22:42:44 +0000 (00:42 +0200)]
Fix UNKNOWN default values in ext/standard
Closes GH-6026
Nikita Popov [Mon, 7 Sep 2020 14:16:25 +0000 (16:16 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Don't leave behind temporary file in bug70362.phpt
Nikita Popov [Mon, 7 Sep 2020 14:15:44 +0000 (16:15 +0200)]
Don't leave behind temporary file in bug70362.phpt
Nikita Popov [Mon, 7 Sep 2020 13:43:26 +0000 (15:43 +0200)]
Drop support for crypt() without explicit salt
crypt() without salt generates a weak $1$ MD5 hash. It has been
throwing a notice since 2013 and we provide a much better alternative
in password_hash() (which can auto-generate salts for strong
password hashes), so keeping this is just a liability.
Nikita Popov [Mon, 7 Sep 2020 10:30:43 +0000 (12:30 +0200)]
Allocate temporary PCRE match data using ZMM
Create a separate general context that uses ZMM as allocator and
use it to allocate temporary PCRE match data (there is still one
global match data). There is no requirement that the match data
and the compiled regex / match context use the same general context.
This makes sure that we do not leak persistent memory on bailout
and fixes oss-fuzz #25296, on which half the libfuzzer runs
currently get stuck.
Nikita Popov [Mon, 7 Sep 2020 09:53:01 +0000 (11:53 +0200)]
Avoid large eval inputs in fuzzer
While we limit the size of the main compilation input, the size
of eval inputs was not limited. This could result in stack
overflows, e.g. oss-fuzz #25464.
Nikita Popov [Mon, 7 Sep 2020 09:42:21 +0000 (11:42 +0200)]
Accept zend_string instead of zval in zend_compile_string
Nikita Popov [Mon, 7 Sep 2020 09:12:41 +0000 (11:12 +0200)]
Private/public split curl header
To allow exporting the php_curl.h header containing curl class
entries, split off a separate curl_private.h header with all the
implementation details.
We may move or expose additional APIs in php_curl.h on an as-needed
basis.
Nikita Popov [Mon, 7 Sep 2020 09:05:07 +0000 (11:05 +0200)]
Remove some unnecessary HAVE_EXTNAME guards
A recurring pattern in old extension: Putting the whole source
code behind HAVE_EXTNAME. This is pointless, as the code is only
compiled if the extension is enabled.
This removes a couple of them, but not all.
David Carlier [Sat, 5 Sep 2020 14:04:01 +0000 (14:04 +0000)]
Opcache JIT, code simplification for Haiku.
More straightforward approach to get the path of the
current PHP process.
Closes GH-6082.
Nikita Popov [Fri, 4 Sep 2020 13:31:32 +0000 (15:31 +0200)]
Add phpunit to community project tests
Nikita Popov [Mon, 7 Sep 2020 07:59:51 +0000 (09:59 +0200)]
Throw on invalid mb_http_input() type
Tyson Andre [Sun, 6 Sep 2020 16:29:32 +0000 (12:29 -0400)]
Fix incorrect/unused macro
zend_ts_hash_init accepts 4 arguments, not 5.
The pHashFunction parameter was removed in
5d2576264653c2faaca9cd7d64218d10ab612408
Closes GH-6087
Tyson Andre [Sun, 6 Sep 2020 13:43:09 +0000 (09:43 -0400)]
Improve handling of `#[` attributes in `php -a`
`php -a` treats lines starting with `#` as comments when deciding if
the provided statement is valid.
So it passed `#[MyAttr]` to the parser after the user hits enter,
causing a syntax error for multi-line statements..
With this patch, the following snippet is parsed correctly
```
php > #[Attr]
php > function x() { }
php > var_export((new ReflectionFunction('x'))->getAttributes()[0]->getName());
'Attr'
```
Followup to GH-6085
Closes GH-6086
Tyson Andre [Sat, 5 Sep 2020 20:52:14 +0000 (16:52 -0400)]
Improve handling of `#[` in `php -a`
PHP treats `#ini_setting=value` as a call to
`ini_set('ini_setting', 'value')`,
and silently skips undeclared settings.
This is a problem due to `#[` becoming supported attribute syntax:
- `#[Attr] const X = 123;` (this is not a valid place to put an attribute)
This does not create a constant.
- `#[Attr] function test($x=false){}` also contains `=`.
This does not create a function.
Instead, only treat lines starting with `#` as a special case
when the next character isn't `[`
Closes GH-6085
Nikita Popov [Sat, 5 Sep 2020 20:10:12 +0000 (22:10 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fix azure i386 build
Nikita Popov [Sat, 5 Sep 2020 19:39:39 +0000 (21:39 +0200)]
Fix azure i386 build
Looks like pgsql on i386 broke even more.
Nikita Popov [Fri, 4 Sep 2020 15:15:35 +0000 (17:15 +0200)]
Handle null encoding in mb_http_input()
Nikita Popov [Fri, 4 Sep 2020 13:22:11 +0000 (15:22 +0200)]
Reenable s390x on travis
Only enable it for cron builds. We don't need to run exotic
architectures on every commit and PR.
Closes GH-6076.
Derick Rethans [Fri, 4 Sep 2020 14:55:08 +0000 (15:55 +0100)]
Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)
Máté Kocsis [Thu, 3 Sep 2020 14:21:36 +0000 (16:21 +0200)]
Promote warnings to exceptions in ext/ldap
Closes GH-6065
Máté Kocsis [Fri, 4 Sep 2020 12:23:43 +0000 (14:23 +0200)]
Use ZPP instead of custom type checks
We can add these types as a native type declaration to stubs as a side-effect. Closes GH-6068
Máté Kocsis [Fri, 4 Sep 2020 12:20:15 +0000 (14:20 +0200)]
Use the canonical order of types in array|string ZPP error messages
Máté Kocsis [Fri, 4 Sep 2020 12:15:17 +0000 (14:15 +0200)]
Add the Z_PARAM_ARRAY_HT_OR_NULL and Z_PARAM_OBJ macros
George Peter Banyard [Thu, 3 Sep 2020 13:49:28 +0000 (15:49 +0200)]
Extract common flock code
As SPL is currently a copie of the code in file.c
Closes GH-6069
Nikita Popov [Fri, 4 Sep 2020 07:41:27 +0000 (09:41 +0200)]
Release call trampolines in zpp fcc
When using zpp 'f' or Z_PARAM_FUNC, if the fcc points to a call
trampoline release it immediately and force zend_call_function
to refetch it. This may require additional callability checks
if __call is used, but avoids the need to carefully free fcc
values in all internal functions -- in some cases this is not
simple, as a type error might be triggered by a later argument
in the same zpp call.
This fixes oss-fuzz #25390.
Closes GH-6073.
Nikita Popov [Fri, 4 Sep 2020 10:34:47 +0000 (12:34 +0200)]
Update travis to bionic
Nikita Popov [Fri, 4 Sep 2020 10:59:42 +0000 (12:59 +0200)]
Make gethostbyname() test more liberal
This returns 127.0.1.1 on travis bionic.
Nikita Popov [Fri, 4 Sep 2020 09:00:09 +0000 (11:00 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Avoid duplicate octal warning during heredoc scan ahead
Nikita Popov [Fri, 4 Sep 2020 08:15:55 +0000 (10:15 +0200)]
Disable InfiniteIterator class while fuzzing
The combination of LimitIterator and InfiniteIterator can cause
effectively infinite loops that bypass the executor step limit.
Nikita Popov [Fri, 4 Sep 2020 08:59:41 +0000 (10:59 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Avoid duplicate octal warning during heredoc scan ahead
Nikita Popov [Fri, 4 Sep 2020 08:58:51 +0000 (10:58 +0200)]
Avoid duplicate octal warning during heredoc scan ahead
Dmitry Stogov [Fri, 4 Sep 2020 08:42:13 +0000 (11:42 +0300)]
Avoid unnecessary IP initiliaization on trace linking
Dmitry Stogov [Thu, 3 Sep 2020 23:10:48 +0000 (02:10 +0300)]
Cleanup macro/function names
Dmitry Stogov [Thu, 3 Sep 2020 20:53:02 +0000 (23:53 +0300)]
Load EX(opline) in one instuction if possible
Dmitry Stogov [Thu, 3 Sep 2020 20:52:24 +0000 (23:52 +0300)]
Reorder DynAsm macros (no other changes)
George Peter Banyard [Thu, 3 Sep 2020 15:17:46 +0000 (17:17 +0200)]
Error promotions in SPL
Warning to Error promotion and a Notice to Warning promotion to align
with the behaviour specified in the Reclassify Engine Warnings RFC.
Closes GH-6072
George Peter Banyard [Thu, 3 Sep 2020 15:43:57 +0000 (17:43 +0200)]
Warning to Error promotion in ext/standard
Those should be the last ones other than set(raw)cookie()
Closes GH-5814
Nikita Popov [Thu, 3 Sep 2020 15:13:47 +0000 (17:13 +0200)]
Merge branch 'PHP-7.4'
* PHP-7.4:
Fixed bug #80049
Nikita Popov [Thu, 3 Sep 2020 15:12:50 +0000 (17:12 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fixed bug #80049
Nikita Popov [Thu, 3 Sep 2020 15:10:34 +0000 (17:10 +0200)]
Fixed bug #80049
Type checking may convert to refcounted values, so force freeing
of extra args.
Dmitry Stogov [Thu, 3 Sep 2020 14:12:23 +0000 (17:12 +0300)]
If we don't know the return address, just escape to VM, instead of adding side exit.
Remove unnecessary exception checks.
Alex Dowad [Fri, 7 Aug 2020 20:29:21 +0000 (22:29 +0200)]
Use symbolic constants in Japanese kana conversion code (not magic numbers)
Also correct misspelling of 'hiragana' as 'hirangana' at the same time.
Alex Dowad [Tue, 28 Jul 2020 21:30:16 +0000 (23:30 +0200)]
Remove unused 'from' field from mbfl_buffer_converter struct
Alex Dowad [Fri, 17 Jul 2020 20:36:39 +0000 (22:36 +0200)]
Add comment to mbfilter_tl_jisx0201_jisx0208.h
Explain the 'ZEN' and 'HAN' in symbolic constant names.
Alex Dowad [Thu, 16 Jul 2020 07:23:37 +0000 (09:23 +0200)]
Remove unneeded function mbfl_filt_ident_common_dtor
This was the default destructor for mbfl_identify_filter structs, but there's nothing
we actually need to do to those structs before freeing them.
Alex Dowad [Thu, 16 Jul 2020 07:15:56 +0000 (09:15 +0200)]
Remove unneeded function mbfl_filt_conv_common_dtor
This is a default destructor for mbfl_convert_filter structs. The thing is: there
isn't really anything that needs to be done to those structs before freeing them.
The default destructor just zeroed out some fields, but there's no reason why
we should actually do that.
Alex Dowad [Wed, 15 Jul 2020 19:56:33 +0000 (21:56 +0200)]
Refactor mbfl_convert.c
Christoph M. Becker [Thu, 3 Sep 2020 13:46:30 +0000 (15:46 +0200)]
Merge branch 'PHP-7.4' into master
* PHP-7.4:
Fix #80048: Bug #69100 has not been fixed for Windows
Christoph M. Becker [Thu, 3 Sep 2020 13:44:38 +0000 (15:44 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
Fix #80048: Bug #69100 has not been fixed for Windows
Christoph M. Becker [Thu, 3 Sep 2020 12:27:45 +0000 (14:27 +0200)]
Fix #80048: Bug #69100 has not been fixed for Windows
We fix the erroneous length calculation on Windows, too.
Closes GH-6067.