]> granicus.if.org Git - php/log
php
4 years agoReduce input size limit in execute fuzzer
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.

4 years agoAdd "const". Move constant strings to read-only memory.
Dmitry Stogov [Mon, 7 Sep 2020 18:35:48 +0000 (21:35 +0300)]
Add "const". Move constant strings to read-only memory.

4 years agoPromote warnings to exceptions in ext/intl
Máté Kocsis [Mon, 10 Aug 2020 21:23:35 +0000 (23:23 +0200)]
Promote warnings to exceptions in ext/intl

Closes GH-5972

4 years agoDon't allow dynamic properties on generators
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.

4 years agoFix UNKNOWN default values in various extensions
Máté Kocsis [Fri, 4 Sep 2020 12:01:09 +0000 (14:01 +0200)]
Fix UNKNOWN default values in various extensions

Closes GH-6075

4 years agoFix UNKNOWN default values in ext/standard
Máté Kocsis [Thu, 20 Aug 2020 22:42:44 +0000 (00:42 +0200)]
Fix UNKNOWN default values in ext/standard

Closes GH-6026

4 years agoMerge branch 'PHP-7.4'
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

4 years agoDon'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

4 years agoDrop support for crypt() without explicit salt
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.

4 years agoAllocate temporary PCRE match data using ZMM
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.

4 years agoAvoid large eval inputs in fuzzer
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.

4 years agoAccept zend_string instead of zval in zend_compile_string
Nikita Popov [Mon, 7 Sep 2020 09:42:21 +0000 (11:42 +0200)]
Accept zend_string instead of zval in zend_compile_string

4 years agoPrivate/public split curl header
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.

4 years agoRemove some unnecessary HAVE_EXTNAME guards
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.

4 years agoOpcache JIT, code simplification for Haiku.
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.

4 years agoAdd phpunit to community project tests
Nikita Popov [Fri, 4 Sep 2020 13:31:32 +0000 (15:31 +0200)]
Add phpunit to community project tests

4 years agoThrow on invalid mb_http_input() type
Nikita Popov [Mon, 7 Sep 2020 07:59:51 +0000 (09:59 +0200)]
Throw on invalid mb_http_input() type

4 years agoFix incorrect/unused macro
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

4 years agoImprove handling of `#[` attributes in `php -a`
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

4 years agoImprove handling of `#[` in `php -a`
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

4 years agoMerge branch 'PHP-7.4'
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

4 years agoFix 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.

4 years agoHandle null encoding in mb_http_input()
Nikita Popov [Fri, 4 Sep 2020 15:15:35 +0000 (17:15 +0200)]
Handle null encoding in mb_http_input()

4 years agoReenable s390x on travis
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.

4 years agoFixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)
Derick Rethans [Fri, 4 Sep 2020 14:55:08 +0000 (15:55 +0100)]
Fixed bug #80057 (DateTimeImmutable::createFromFormat() does not populate time)

4 years agoPromote warnings to exceptions in ext/ldap
Máté Kocsis [Thu, 3 Sep 2020 14:21:36 +0000 (16:21 +0200)]
Promote warnings to exceptions in ext/ldap

Closes GH-6065

4 years agoUse ZPP instead of custom type checks
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

4 years agoUse the canonical order of types in array|string ZPP error messages
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

4 years agoAdd the Z_PARAM_ARRAY_HT_OR_NULL and Z_PARAM_OBJ macros
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

4 years agoExtract common flock code
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

4 years agoRelease call trampolines in zpp fcc
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.

4 years agoUpdate travis to bionic
Nikita Popov [Fri, 4 Sep 2020 10:34:47 +0000 (12:34 +0200)]
Update travis to bionic

4 years agoMake gethostbyname() test more liberal
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.

4 years agoMerge branch 'PHP-7.4'
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

4 years agoDisable InfiniteIterator class while fuzzing
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.

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
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

4 years agoAvoid 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

4 years agoAvoid unnecessary IP initiliaization on trace linking
Dmitry Stogov [Fri, 4 Sep 2020 08:42:13 +0000 (11:42 +0300)]
Avoid unnecessary IP initiliaization on trace linking

4 years agoCleanup macro/function names
Dmitry Stogov [Thu, 3 Sep 2020 23:10:48 +0000 (02:10 +0300)]
Cleanup macro/function names

4 years agoLoad EX(opline) in one instuction if possible
Dmitry Stogov [Thu, 3 Sep 2020 20:53:02 +0000 (23:53 +0300)]
Load EX(opline) in one instuction if possible

4 years agoReorder DynAsm macros (no other changes)
Dmitry Stogov [Thu, 3 Sep 2020 20:52:24 +0000 (23:52 +0300)]
Reorder DynAsm macros (no other changes)

4 years agoError promotions in SPL
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

4 years agoWarning to Error promotion in ext/standard
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

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 3 Sep 2020 15:13:47 +0000 (17:13 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #80049

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
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

4 years agoFixed 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.

4 years agoIf we don't know the return address, just escape to VM, instead of adding side exit.
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.

4 years agoUse symbolic constants in Japanese kana conversion code (not magic numbers)
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.

4 years agoRemove unused 'from' field from mbfl_buffer_converter struct
Alex Dowad [Tue, 28 Jul 2020 21:30:16 +0000 (23:30 +0200)]
Remove unused 'from' field from mbfl_buffer_converter struct

4 years agoAdd comment to mbfilter_tl_jisx0201_jisx0208.h
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.

4 years agoRemove unneeded function mbfl_filt_ident_common_dtor
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.

4 years agoRemove unneeded function mbfl_filt_conv_common_dtor
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.

4 years agoRefactor mbfl_convert.c
Alex Dowad [Wed, 15 Jul 2020 19:56:33 +0000 (21:56 +0200)]
Refactor mbfl_convert.c

4 years agoMerge branch 'PHP-7.4' into master
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

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
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

4 years agoFix #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.

4 years agoFix Windows build
Christoph M. Becker [Thu, 3 Sep 2020 13:28:30 +0000 (15:28 +0200)]
Fix Windows build

4 years agoTry to fix windows build
Nikita Popov [Thu, 3 Sep 2020 13:06:42 +0000 (15:06 +0200)]
Try to fix windows build

4 years agoAdd Z_PARAM_ITERABLE and co
Levi Morrison [Thu, 3 Sep 2020 13:03:12 +0000 (07:03 -0600)]
Add Z_PARAM_ITERABLE and co

4 years agoRefactor parts of SPL Dir/SplFileObject
George Peter Banyard [Thu, 3 Sep 2020 12:15:18 +0000 (14:15 +0200)]
Refactor parts of SPL Dir/SplFileObject

This fixes a way it was possible to trigger an Internel Error
by disabling function (via the INI setting) when SPL was acting
as a proxy to the function call.

Fix flock_compat layer as it needs to used in SPL now.

Use macro to check if object is initialized

Closes GH-6014

4 years agoFix mismatch between macro and struct definition
George Peter Banyard [Thu, 3 Sep 2020 11:05:50 +0000 (13:05 +0200)]
Fix mismatch between macro and struct definition

4 years agoFix leaks in sapi tests
Nikita Popov [Thu, 3 Sep 2020 10:59:30 +0000 (12:59 +0200)]
Fix leaks in sapi tests

Make sure to always free compiled_filename on shutdown.

4 years agoDon't intern compiled_filename
Nikita Popov [Thu, 3 Sep 2020 09:56:55 +0000 (11:56 +0200)]
Don't intern compiled_filename

For php-ast interning the file name is an effective memory leak,
see php-ast#134.

I don't think there's any reason to do this. At some point this
was needed due to bugs in the interned string mechanism that
caused issues if the string was later interned, e.g. through a
__FILE__ reference. These issues have since been resolved.

In conjunction with the filenames_table removal in c4016ecd446ef26bb3dc77735b6e441e151ea985
this means that filenames now need to be refcounted like normal
strings. In particular the filename reference in op_arrays and CEs
are refcounted.

4 years agoRemove CG(filenames_table)
Nikita Popov [Thu, 3 Sep 2020 09:30:58 +0000 (11:30 +0200)]
Remove CG(filenames_table)

This doesn't seem to serve any purpose anymore.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 3 Sep 2020 09:19:11 +0000 (11:19 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #80046

4 years agoFixed bug #80046
Nikita Popov [Thu, 3 Sep 2020 09:16:50 +0000 (11:16 +0200)]
Fixed bug #80046

We already protect against optimizing away loop frees in DFA pass,
but not in block pass.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 3 Sep 2020 09:18:11 +0000 (11:18 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fixed bug #80046

4 years agoFixed bug #80046
Nikita Popov [Thu, 3 Sep 2020 09:16:50 +0000 (11:16 +0200)]
Fixed bug #80046

We already protect against optimizing away loop frees in DFA pass,
but not in block pass.

4 years agoJIT for FE_FETCH_R
Dmitry Stogov [Thu, 3 Sep 2020 09:06:06 +0000 (12:06 +0300)]
JIT for FE_FETCH_R

4 years agoMerge branch 'PHP-7.4' into master
Christoph M. Becker [Thu, 3 Sep 2020 08:33:35 +0000 (10:33 +0200)]
Merge branch 'PHP-7.4' into master

* PHP-7.4:
  Skip test if A: drive exists

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Thu, 3 Sep 2020 08:30:39 +0000 (10:30 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Skip test if A: drive exists

4 years agoSkip test if A: drive exists
Christoph M. Becker [Thu, 3 Sep 2020 08:26:05 +0000 (10:26 +0200)]
Skip test if A: drive exists

Otherwise the test case will fail for a very different reason.

4 years agoFixed bug #80045
Nikita Popov [Thu, 3 Sep 2020 08:29:18 +0000 (10:29 +0200)]
Fixed bug #80045

Applying the obvious fix ... however, I think we may need to
rething how we handle trampoline fcc for "f" zpp. It might make
sense to use fcc->function_handler == NULL for that case and
force it to be fetched in zend_call_function instead (it will
be reset to that after the call anyway). Otherwise we will keep
chasing these leaks, as it's the only instance where it's
necessary to free a zpp result.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Thu, 3 Sep 2020 07:51:54 +0000 (09:51 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Handle memory limit error during string reallocation correctly

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Thu, 3 Sep 2020 07:51:35 +0000 (09:51 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Handle memory limit error during string reallocation correctly

4 years agoFixed support for deprecated constants (Zend/tests/const_deprecation.phpt failure)
Dmitry Stogov [Thu, 3 Sep 2020 07:49:58 +0000 (10:49 +0300)]
Fixed support for deprecated constants (Zend/tests/const_deprecation.phpt failure)

4 years agoHandle memory limit error during string reallocation correctly
Nikita Popov [Thu, 3 Sep 2020 07:45:54 +0000 (09:45 +0200)]
Handle memory limit error during string reallocation correctly

Do not decrement the refcount before allocating the new string,
as the allocation operation may bail out and cause a use-after-free
lateron. We can only decrement the refcount once the allocation
has succeeded.

Fixes oss-fuzz #25384.

4 years agoJIT for FETCH_CONSTANT
Dmitry Stogov [Wed, 2 Sep 2020 21:51:43 +0000 (00:51 +0300)]
JIT for FETCH_CONSTANT

4 years agoReorder switch cases for consistency between zend_jit() and zend_jit_trace()
Dmitry Stogov [Wed, 2 Sep 2020 20:16:58 +0000 (23:16 +0300)]
Reorder switch cases for consistency between zend_jit() and zend_jit_trace()

4 years agolibmagic: Update patch
Anatol Belski [Wed, 2 Sep 2020 19:25:00 +0000 (21:25 +0200)]
libmagic: Update patch

[ci skip]

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoFix typos in mbstring tests
Alex Dowad [Thu, 30 Jul 2020 20:08:25 +0000 (22:08 +0200)]
Fix typos in mbstring tests

Man, I can be pedantic sometimes. Tiny little things like misspelled words just
hurt me inside. So while it's not really a big deal, I couldn't leave these typos
alone...

4 years agoUpdate NEWS, UPGRADING
Benjamin Eberlei [Wed, 2 Sep 2020 18:32:52 +0000 (20:32 +0200)]
Update NEWS, UPGRADING

4 years agoChange Attribute Syntax from @@ to #[]
Benjamin Eberlei [Sat, 15 Aug 2020 08:39:00 +0000 (10:39 +0200)]
Change Attribute Syntax from @@ to #[]

4 years agoRevert "libmagic: Move the allocation on the stack"
Anatol Belski [Wed, 2 Sep 2020 18:04:00 +0000 (20:04 +0200)]
Revert "libmagic: Move the allocation on the stack"

This reverts commit 1d84a58736541b61fc9d569580715940e32d55c9.

Signed-off-by: Anatol Belski <ab@php.net>
4 years agoJIT for FE_FETCH_R
Dmitry Stogov [Wed, 2 Sep 2020 17:10:02 +0000 (20:10 +0300)]
JIT for FE_FETCH_R

4 years agolibmagic: Constify arg
Anatol Belski [Wed, 2 Sep 2020 15:04:57 +0000 (17:04 +0200)]
libmagic: Constify arg

4 years agolibmagic: Move the allocation on the stack
Anatol Belski [Wed, 2 Sep 2020 14:58:44 +0000 (16:58 +0200)]
libmagic: Move the allocation on the stack

4 years agohash: Fix warning in the bench script
Anatol Belski [Wed, 2 Sep 2020 14:57:27 +0000 (16:57 +0200)]
hash: Fix warning in the bench script

4 years agoExtend function blacklist in execute fuzzer
Nikita Popov [Wed, 2 Sep 2020 15:05:18 +0000 (17:05 +0200)]
Extend function blacklist in execute fuzzer

Add pfsockopen and stream_socket_server.

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 2 Sep 2020 14:46:49 +0000 (16:46 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix binary-safety of parse_url

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 2 Sep 2020 14:45:57 +0000 (16:45 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix binary-safety of parse_url

4 years agoFix binary-safety of parse_url
Nikita Popov [Wed, 2 Sep 2020 14:43:00 +0000 (16:43 +0200)]
Fix binary-safety of parse_url

php_parse_url() is intended to support strings that are not zero
terminated. We can't use strcspn in the implementation.

As we have two uses of strcspn, add a helper.

4 years agoMicro-optimization
Dmitry Stogov [Wed, 2 Sep 2020 14:31:48 +0000 (17:31 +0300)]
Micro-optimization

4 years agoX86: Fast CRC32 computation using PCLMULQDQ instruction
Frank Du [Wed, 2 Sep 2020 10:53:29 +0000 (10:53 +0000)]
X86: Fast CRC32 computation using PCLMULQDQ instruction

Based on:
"Fast CRC Computation for Generic Polynomials Using PCLMULQDQ Instruction"
V. Gopal, E. Ozturk, et al., 2009, http://intel.ly/2ySEwL0

Signed-off-by: Frank Du <frank.du@intel.com>
Closes GH-6018

4 years agoFix typo in test description
Michael Voříšek [Wed, 2 Sep 2020 10:24:43 +0000 (12:24 +0200)]
Fix typo in test description

Closes GH-6062.

4 years agoAdded missing helper
Dmitry Stogov [Wed, 2 Sep 2020 09:59:52 +0000 (12:59 +0300)]
Added missing helper

4 years agoImproved JIT for VERIFY_RETURN_TYPE
Dmitry Stogov [Wed, 2 Sep 2020 09:55:16 +0000 (12:55 +0300)]
Improved JIT for VERIFY_RETURN_TYPE

4 years agoMove custom type checks to ZPP
Máté Kocsis [Mon, 24 Aug 2020 18:42:29 +0000 (20:42 +0200)]
Move custom type checks to ZPP

Closes GH-6034

4 years agoMerge branch 'PHP-7.4'
Nikita Popov [Wed, 2 Sep 2020 08:53:44 +0000 (10:53 +0200)]
Merge branch 'PHP-7.4'

* PHP-7.4:
  Fix throwing of yield from related exceptions into generator

4 years agoMerge branch 'PHP-7.3' into PHP-7.4
Nikita Popov [Wed, 2 Sep 2020 08:53:13 +0000 (10:53 +0200)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  Fix throwing of yield from related exceptions into generator