]> granicus.if.org Git - php/log
php
3 years agoFix refcount inference for typed properties
Nikita Popov [Tue, 16 Mar 2021 10:15:48 +0000 (11:15 +0100)]
Fix refcount inference for typed properties

We were not adding RC1/RCN if the MAY_BE_OBJECT came from a class
type and there was no other refcounted type in the union.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Mar 2021 09:41:40 +0000 (09:41 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFix build version too
Derick Rethans [Tue, 16 Mar 2021 09:41:21 +0000 (09:41 +0000)]
Fix build version too

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Mar 2021 09:40:21 +0000 (09:40 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoNEWS for 7.4.18
Derick Rethans [Tue, 16 Mar 2021 09:40:05 +0000 (09:40 +0000)]
NEWS for 7.4.18

3 years agoPrepare for 7.4.17RC1
Derick Rethans [Tue, 16 Mar 2021 09:33:33 +0000 (09:33 +0000)]
Prepare for 7.4.17RC1

3 years agoFix ldap_next_entry() parameter name
Máté Kocsis [Mon, 15 Mar 2021 22:07:27 +0000 (23:07 +0100)]
Fix ldap_next_entry() parameter name

3 years agoFix crash in LDAP search functions during argument validation
Máté Kocsis [Mon, 15 Mar 2021 22:07:05 +0000 (23:07 +0100)]
Fix crash in LDAP search functions during argument validation

3 years agoAdd missing skipif sections to ext/dom tests
Máté Kocsis [Mon, 15 Mar 2021 22:45:37 +0000 (23:45 +0100)]
Add missing skipif sections to ext/dom tests

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 15 Mar 2021 17:39:11 +0000 (18:39 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80817: dba_popen() may cause segfault during RSHUTDOWN

3 years agoFix #80817: dba_popen() may cause segfault during RSHUTDOWN
Christoph M. Becker [Mon, 1 Mar 2021 17:14:26 +0000 (18:14 +0100)]
Fix #80817: dba_popen() may cause segfault during RSHUTDOWN

We need to close persistent streams with the proper flag.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Mar 2021 13:47:50 +0000 (14:47 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug #80866

3 years agoFix bug #80866
Dharman [Mon, 15 Mar 2021 12:21:44 +0000 (12:21 +0000)]
Fix bug #80866

Closes GH-6774.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Mar 2021 13:38:22 +0000 (14:38 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix bug #80837

3 years agoFix bug #80837
Dharman [Fri, 5 Mar 2021 21:45:27 +0000 (21:45 +0000)]
Fix bug #80837

The error needs to be reported on the statement, not the connection.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Mar 2021 13:12:42 +0000 (14:12 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Update ubuntu on i386 job
  Downgrade security level in tests using TLS < 1.2

3 years agoUpdate ubuntu on i386 job
Nikita Popov [Mon, 15 Mar 2021 11:11:51 +0000 (12:11 +0100)]
Update ubuntu on i386 job

There is a failure with apt on PHP-7.4 that's not present on
PHP-8.0/master. Switching to a newer ubuntu version on PHP-7.4
avoids the issue.

3 years agoDowngrade security level in tests using TLS < 1.2
Nikita Popov [Thu, 18 Jun 2020 13:08:24 +0000 (15:08 +0200)]
Downgrade security level in tests using TLS < 1.2

A few additional tests have been added on master that require
lower security level.

(cherry picked from commit c2a6395dcbab20549702e56006f7cd389cefebcd)

3 years agoext/opcache: fix configure output while checking mmap MAP_ANON support
Michael Heimpold [Sun, 7 Mar 2021 09:00:43 +0000 (10:00 +0100)]
ext/opcache: fix configure output while checking mmap MAP_ANON support

It seems that f3efb9e3fb introduced a "typo" which may result
in the following confusing message:

checking for mmap() using MAP_ANON shared memory support... no=yes

Let's fix this.

Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Closes GH-6758.

3 years agoFixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for...
Dmitry Stogov [Wed, 10 Mar 2021 13:03:47 +0000 (16:03 +0300)]
Fixed bug #80814 (threaded mod_php won't load on FreeBSD: No space available for static Thread Local Storage)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 8 Mar 2021 14:08:11 +0000 (15:08 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #51903: simplexml_load_file() doesn't use HTTP headers

3 years agoFix #51903: simplexml_load_file() doesn't use HTTP headers
Christoph M. Becker [Wed, 3 Mar 2021 18:23:39 +0000 (19:23 +0100)]
Fix #51903: simplexml_load_file() doesn't use HTTP headers

The `encoding` attribute of the XML declaration is optional; it is good
practice to use external encoding information where available if it is
missing.  Thus, we check for `charset` info of `Content-Type` headers,
and see whether the encoding is supported.

We cater to trailing parameters and quoted-strings, but not to escaped
backslashes and quotes in quoted-strings, since no known character
encoding contains these anyway.

Co-authored-by: Michael Wallner <mike@php.net>
Closes GH-6747.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 8 Mar 2021 13:39:38 +0000 (14:39 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101

3 years agoFix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101
manuel [Fri, 5 Mar 2021 23:59:45 +0000 (00:59 +0100)]
Fix #80838: HTTP wrapper waits for HTTP 1 response after HTTP 101

Don't wait for further responses after a HTTP 101 (Switching Protocols) response

Closes GH-6730.

3 years agoFix the error message of attribute flag validation
Máté Kocsis [Fri, 5 Mar 2021 23:56:25 +0000 (00:56 +0100)]
Fix the error message of attribute flag validation

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
George Wang [Fri, 5 Mar 2021 16:00:53 +0000 (11:00 -0500)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoMerge branch 'PHP-7.4' of git.php.net:php-src into PHP-7.4
George Wang [Fri, 5 Mar 2021 15:57:46 +0000 (10:57 -0500)]
Merge branch 'PHP-7.4' of git.php.net:php-src into PHP-7.4

3 years agoLiteSpeed SAPI v7.9: Process manager keeps forked child process alive for longer...
George Wang [Fri, 5 Mar 2021 15:46:12 +0000 (10:46 -0500)]
LiteSpeed SAPI v7.9: Process manager keeps forked child process alive for longer time based on load. Reduces PM overhead for busy setup.

3 years agoAdd supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in...
David Carlier [Sat, 27 Feb 2021 14:07:59 +0000 (14:07 +0000)]
Add supports for FreeBSD's PROT_MAX to let mprotect knows X flag can be applied in addition.

Closes GH-6738.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Fri, 5 Mar 2021 14:08:24 +0000 (15:08 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Print error code if CreateMutex() fails

3 years agoPrint error code if CreateMutex() fails
Christoph M. Becker [Tue, 2 Mar 2021 11:19:43 +0000 (12:19 +0100)]
Print error code if CreateMutex() fails

This issue came up recently in a bug report[1]; without the error code,
users can barely guess why the function failed.

[1] <https://bugs.php.net/80812>

Closes GH-6745.

3 years agoFix ASAN warning (Zend/zend_string.h:165:2: runtime error: null pointer passed as...
Dmitry Stogov [Thu, 4 Mar 2021 14:27:26 +0000 (17:27 +0300)]
Fix ASAN warning (Zend/zend_string.h:165:2: runtime error: null pointer passed as argument 2 of memcpy(), which is declared to never be null)

3 years agoFix #80825: ZipArchive::isCompressionMethodSupported does not exist
Christoph M. Becker [Wed, 3 Mar 2021 21:56:42 +0000 (22:56 +0100)]
Fix #80825: ZipArchive::isCompressionMethodSupported does not exist

`HAVE_METHOD_SUPPORTED` should have been defined after we updated to
libzip 1.7.1 months ago.

3 years agoFix test wrt. server.inc changes
Christoph M. Becker [Wed, 3 Mar 2021 10:56:03 +0000 (11:56 +0100)]
Fix test wrt. server.inc changes

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 3 Mar 2021 09:47:09 +0000 (10:47 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #78719: http wrapper silently ignores long Location headers

3 years agoFix #78719: http wrapper silently ignores long Location headers
Christoph M. Becker [Tue, 23 Feb 2021 14:32:54 +0000 (15:32 +0100)]
Fix #78719: http wrapper silently ignores long Location headers

When opening HTTP streams, and reading the headers, we currently
discard header lines longer than `HTTP_HEADER_BLOCK_SIZE` (1024 bytes).
While this is not generally forbidden by RFC 7230, section 3.2.5, it
is not generally allowed either, since that may change the "message
framing or response semantics".

We thus fix this by allowing arbitrarily long header lines.

Closes GH-6720.

3 years agoFixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT)
Dmitry Stogov [Mon, 1 Mar 2021 20:57:20 +0000 (23:57 +0300)]
Fixed bug #80802: (zend_jit_fetch_indirect_var assert failure with tracing JIT)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 1 Mar 2021 17:50:11 +0000 (18:50 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80751: Comma in recipient name breaks email delivery

3 years agoFix #80751: Comma in recipient name breaks email delivery
Christoph M. Becker [Mon, 1 Mar 2021 15:18:40 +0000 (16:18 +0100)]
Fix #80751: Comma in recipient name breaks email delivery

So far, `SendText()` simply separates potential email address lists at
any comma, disregarding that commas inside a quoted-string do not
delimit addresses.  We fix that by introducing an own variant of
`strtok_r()` which caters to quoted-strings.

We also make `FormatEmailAddress()` aware of quoted strings.

We do not cater to email address comments, and potentially other quirks
of RFC 5322 email addresses, but catering to quoted-strings is supposed
to solve almost all practical use cases.

Co-authored-by: Nikita Popov <nikita.ppv@gmail.com>
Closes GH-6735.

3 years agoFixed bug #80811
Nikita Popov [Mon, 1 Mar 2021 14:01:09 +0000 (15:01 +0100)]
Fixed bug #80811

When filling in defaults for skipped params, make sure that
reference parameters get the expected reference wrapper.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 1 Mar 2021 15:22:29 +0000 (16:22 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Always remove HT iterators, even for uninit HT

3 years agoAlways remove HT iterators, even for uninit HT
Nikita Popov [Mon, 1 Mar 2021 15:20:31 +0000 (16:20 +0100)]
Always remove HT iterators, even for uninit HT

Fixes oss-fuzz #31423.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 1 Mar 2021 14:13:25 +0000 (15:13 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80805

3 years agoFixed bug #80805
Nikita Popov [Fri, 11 Sep 2020 20:36:41 +0000 (22:36 +0200)]
Fixed bug #80805

Handle missing result_var in binary_op_result_type.

(cherry picked from commit 8446e2827585c37d0739f8d44fa8d359cbbb6551)

3 years agoFix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE
George Peter Banyard [Fri, 26 Feb 2021 03:03:38 +0000 (03:03 +0000)]
Fix Bug #80800 imap_open() fails when the flags parameter includes CL_EXPUNGE

This also affected imap_reopen().
Add a supplementary test that the CL_EXPUNGE flag does have
the intended effect.

Closes GH-6732

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Felipe Pena [Thu, 25 Feb 2021 20:54:24 +0000 (20:54 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFix memleak on ReflectionFunction and ReflectionGenerator classes when calling __cons...
Felipe Pena [Thu, 25 Feb 2021 20:53:14 +0000 (20:53 +0000)]
Fix memleak on ReflectionFunction and ReflectionGenerator classes when calling __construct after instantiation

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Remi Collet [Thu, 25 Feb 2021 12:54:19 +0000 (13:54 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  skip test with openssl < 1.1.0

3 years agoskip test with openssl < 1.1.0
Remi Collet [Thu, 25 Feb 2021 12:52:35 +0000 (13:52 +0100)]
skip test with openssl < 1.1.0

The test fails, but without any crash
(this test is designed to catch a crash)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Thu, 25 Feb 2021 11:03:43 +0000 (12:03 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Capture Microsoft-defined HRESULT exit codes exit codes

3 years agoCapture Microsoft-defined HRESULT exit codes exit codes
Dylan K. Taylor [Tue, 23 Feb 2021 21:34:51 +0000 (22:34 +0100)]
Capture Microsoft-defined HRESULT exit codes exit codes

The lack of such a check leads to false-passes of tests on Windows
which expect no output, but produce a segfault or similar issue. I
discovered this a while ago due to bad tests in an extension I maintain.

Closes GH-6722.

3 years agocrc32 module, clang spurious warning removal.
David CARLIER [Wed, 24 Feb 2021 20:34:33 +0000 (20:34 +0000)]
crc32 module, clang spurious warning removal.

Closes GH-6725.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Thu, 25 Feb 2021 08:52:07 +0000 (09:52 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  mysqlnd pam fix test error message

3 years agomysqlnd pam fix test error message
Daniel Black [Thu, 25 Feb 2021 02:09:08 +0000 (13:09 +1100)]
mysqlnd pam fix test error message

Closes GH-6727.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Wed, 24 Feb 2021 20:30:44 +0000 (21:30 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix potential file collision in dom tests

3 years agoFix potential file collision in dom tests
Nikita Popov [Wed, 24 Feb 2021 20:30:20 +0000 (21:30 +0100)]
Fix potential file collision in dom tests

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Felipe Pena [Wed, 24 Feb 2021 19:07:22 +0000 (19:07 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFix bug #80757 (Exit code is 0 when could not open file)
Felipe Pena [Wed, 24 Feb 2021 18:17:27 +0000 (18:17 +0000)]
Fix bug #80757 (Exit code is 0 when could not open file)

3 years agoUpdate NEWS
Felipe Pena [Wed, 24 Feb 2021 18:40:32 +0000 (18:40 +0000)]
Update NEWS

3 years agoFixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)
Dmitry Stogov [Wed, 24 Feb 2021 09:20:20 +0000 (12:20 +0300)]
Fixed bug #80782 (DASM_S_RANGE_VREG on PHP_INT_MIN-1)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 23 Feb 2021 12:22:25 +0000 (13:22 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  run-tests: fixed exit code not being set on BORKED tests

3 years agoMerge branch 'PHP-7.3' into PHP-7.4
Christoph M. Becker [Tue, 23 Feb 2021 12:14:42 +0000 (13:14 +0100)]
Merge branch 'PHP-7.3' into PHP-7.4

* PHP-7.3:
  run-tests: fixed exit code not being set on BORKED tests

3 years agorun-tests: fixed exit code not being set on BORKED tests PHP-7.3
Dylan K. Taylor [Mon, 22 Feb 2021 23:56:11 +0000 (23:56 +0000)]
run-tests: fixed exit code not being set on BORKED tests

When no test paths are specified this shows up when 'make test' is used on a PECL extension without specifying tests to run (or in php-src too, I guess...)

Closes GH-6717.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Tue, 23 Feb 2021 11:16:15 +0000 (12:16 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Update php_version.h to proper version number

3 years agoUpdate php_version.h to proper version number
Christoph M. Becker [Tue, 23 Feb 2021 11:09:06 +0000 (12:09 +0100)]
Update php_version.h to proper version number

3 years agoFixed bug #80786
Nikita Popov [Tue, 23 Feb 2021 09:17:30 +0000 (10:17 +0100)]
Fixed bug #80786

Don't use r0 as temporary register in math_double_long if it is
already used for a memory result.

This was already done in one branch, but not the other.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 14:31:49 +0000 (15:31 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #75776: Flushing streams with compression filter is broken

3 years agoFix #75776: Flushing streams with compression filter is broken
Christoph M. Becker [Tue, 16 Feb 2021 18:36:37 +0000 (19:36 +0100)]
Fix #75776: Flushing streams with compression filter is broken

First, the `bzip2.compress` filter has the same issue as `zlib.deflate`
so we port the respective fix[1] to ext/bz2.

Second, there is still an issue, if a stream with an attached
compression filter is flushed before it is closed, without any writes
in between.  In that case, the compression is never finalized.  We fix
this by enforcing a `_php_stream_flush()` with the `closing` flag set
in `_php_stream_free()`, whenever a write filter is attached.  This
call is superfluous for most write filters, but does not hurt, even
when it is unnecessary.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=20e75329f2adb11dd231852c061926d0e4080929>

Closes GH-6703.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 13:33:49 +0000 (14:33 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI

3 years agoFix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI
Christoph M. Becker [Mon, 22 Feb 2021 11:24:15 +0000 (12:24 +0100)]
Fix #80771: phpinfo(INFO_CREDITS) displays nothing in CLI

There is no good reason not to show the credits in text based SAPIs,
except for brevity.  Thus, we suppress the credits from `php -i`.

Closes GH-6710.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Mon, 22 Feb 2021 11:34:54 +0000 (12:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80774: session_name() problem with backslash

3 years agoFix #80774: session_name() problem with backslash
Christoph M. Becker [Fri, 19 Feb 2021 12:14:26 +0000 (13:14 +0100)]
Fix #80774: session_name() problem with backslash

Since we do no longer URL decode cookie names[1], we must not URL
encode the session name.  We need to prevent broken Set-Cookie headers,
by rejecting names which contain invalid characters.

[1] <http://git.php.net/?p=php-src.git;a=commit;h=6559fe912661ca5ce5f0eeeb591d928451428ed0>

Closes GH-6711.

3 years agoFix trampoline leak on dynamic static call of non-static method
Nikita Popov [Mon, 22 Feb 2021 09:32:28 +0000 (10:32 +0100)]
Fix trampoline leak on dynamic static call of non-static method

Fixes oss-fuzz #30317.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 22 Feb 2021 08:37:51 +0000 (09:37 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80781

3 years agoFixed bug #80781
Nikita Popov [Mon, 22 Feb 2021 08:33:23 +0000 (09:33 +0100)]
Fixed bug #80781

zend_find_array_dim_slow() may throw, make sure to handle this.
This backports the code we already use for this on PHP-8.0,
and also backports an exception check that makes this easier to
catch.

3 years agoAvoid signed integer overflow in substr()
Nikita Popov [Thu, 18 Feb 2021 09:29:19 +0000 (10:29 +0100)]
Avoid signed integer overflow in substr()

Perform negation after the (size_t) cast rather than before,
so as to avoid a signed integer overflow for PHP_INT_MIN.

Fixes oss-fuzz #31069.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Christoph M. Becker [Wed, 17 Feb 2021 16:28:22 +0000 (17:28 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix #80763: msgfmt_format() does not accept DateTime references

3 years agoFix #80763: msgfmt_format() does not accept DateTime references
Christoph M. Becker [Wed, 17 Feb 2021 13:05:28 +0000 (14:05 +0100)]
Fix #80763: msgfmt_format() does not accept DateTime references

`intl_zval_to_millis()` needs to cater to references.

Closes GH-6707.

3 years agoColor LEAK&FAIL like a failure
Nikita Popov [Wed, 17 Feb 2021 11:39:27 +0000 (12:39 +0100)]
Color LEAK&FAIL like a failure

3 years agoPrep for 8.0.4
Sara Golemon [Wed, 17 Feb 2021 15:24:36 +0000 (15:24 +0000)]
Prep for 8.0.4

3 years agoFixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involvi...
Dmitry Stogov [Wed, 17 Feb 2021 08:51:13 +0000 (11:51 +0300)]
Fixed bug #80745 (JIT produces Assert failure and UNKNOWN:0 var_dumps in code involving bitshifts)

3 years agoRemove generated zend_jit_x86.c on `make clean`
Dylan T [Tue, 16 Feb 2021 18:40:26 +0000 (18:40 +0000)]
Remove generated zend_jit_x86.c on `make clean`

Not removing this causes build failure when reconfiguring and rebuilding after a `make clean`, e.g. enabling/disabling ZTS.

This makes https://bugs.php.net/bug.php?id=80561 more bearable. Ideally it would be rebuilt automatically on configuration change if necessary, but I have no idea how to implement this.

Closes GH-6702.

3 years agoFixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)
Dmitry Stogov [Tue, 16 Feb 2021 17:02:12 +0000 (20:02 +0300)]
Fixed bug #80742 (Opcache JIT makes some boolean logic unexpectedly be true)

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 16 Feb 2021 14:34:29 +0000 (15:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Handle incomplete result set metadata more gracefully

3 years agoHandle incomplete result set metadata more gracefully
Nikita Popov [Tue, 16 Feb 2021 14:26:31 +0000 (15:26 +0100)]
Handle incomplete result set metadata more gracefully

Rather than segfaulting because sname is missing lateron, report
a FAIL here. As this indicates a server bug, the errors is reported
as an out of band warning, rather than a client error.

This fixes the PHP side of bug #80713.

3 years agoMark resource-like objects as non-comparable
Nikita Popov [Tue, 16 Feb 2021 13:20:45 +0000 (14:20 +0100)]
Mark resource-like objects as non-comparable

As these hold on to some internal resource, there can't be two
"equal" objects with different identity. Make sure the lack of
public properties doesn't result in these being treated as always
equal.

3 years agoFixed bug #80723
Nikita Popov [Tue, 16 Feb 2021 11:32:43 +0000 (12:32 +0100)]
Fixed bug #80723

This fixes the issue just for the Socket class. Presumably we'll
want to do the same for other "resource" objects.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Feb 2021 11:31:43 +0000 (11:31 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoFixed dates
Derick Rethans [Tue, 16 Feb 2021 11:31:34 +0000 (11:31 +0000)]
Fixed dates

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Derick Rethans [Tue, 16 Feb 2021 11:27:17 +0000 (11:27 +0000)]
Merge branch 'PHP-7.4' into PHP-8.0

3 years agoPHP-7.4 is now 7.4.17-dev
Derick Rethans [Tue, 16 Feb 2021 11:26:47 +0000 (11:26 +0000)]
PHP-7.4 is now 7.4.17-dev

3 years agoIncrease timeout on asan job
Nikita Popov [Tue, 16 Feb 2021 09:15:08 +0000 (10:15 +0100)]
Increase timeout on asan job

Regularly runs against the 5:10 hour limit on master. Increase it
to 6:00 hours.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Tue, 16 Feb 2021 09:12:42 +0000 (10:12 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Suppress OpenSSL error on missing optional config

3 years agoSuppress OpenSSL error on missing optional config
Nikita Popov [Mon, 15 Feb 2021 14:54:49 +0000 (15:54 +0100)]
Suppress OpenSSL error on missing optional config

openssl_pkey_new() fetches various options from the config file --
most of these are optional, and not specifying them is not an error
condition from the perspective of the user. Unfortunately, the
CONF_get_string() API pushes an error when accessing a key that
doesn't exist (_CONF_get_string does not, but that is presumably a
private API). This commit adds a helper php_openssl_conf_get_string()
that automatically clears the error in this case. I've found that
OpenSSL occasionally does the same thing internally:
https://github.com/openssl/openssl/blob/22040fb790c854cefb04bed98ed38ea6357daf83/apps/req.c#L515-L517

Closes GH-6699.

3 years agoAdapt test case for libcurl 7.75.0+
Christoph M. Becker [Mon, 15 Feb 2021 23:17:13 +0000 (00:17 +0100)]
Adapt test case for libcurl 7.75.0+

libcurl 7.75.0 finally adds support for `gophers://`, i.e. gopher over
TLS.  The protocol is neither standardized, nor is the protocol
registered with IANA, but well, it is there and the test case should
cater to that.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 14:34:11 +0000 (15:34 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fixed bug #80747

3 years agoFixed bug #80747
Nikita Popov [Mon, 15 Feb 2021 14:33:42 +0000 (15:33 +0100)]
Fixed bug #80747

If RSA key generation fails, actually report that failure.

3 years agoMerge branch 'PHP-7.4' into PHP-8.0
Nikita Popov [Mon, 15 Feb 2021 13:58:59 +0000 (14:58 +0100)]
Merge branch 'PHP-7.4' into PHP-8.0

* PHP-7.4:
  Fix symtable cache being used while cleaning symtable

3 years agoFix symtable cache being used while cleaning symtable
Nikita Popov [Mon, 15 Feb 2021 13:52:38 +0000 (14:52 +0100)]
Fix symtable cache being used while cleaning symtable

We need to first clean the symtable and then check whether a cache
slot is available for it. Otherwise, it may happen that a destructor
runs while cleaning the table and uses up all the remaining slots
in the cache.

This is particularly insidious because once we overflow the cache,
the first pointer we modify is symtable_cache_ptr, making it hard
to understand what happened after the fact.

Fixes oss-fuzz #30815.

3 years agoFix assertion failure in cufa optimization with named args
Nikita Popov [Mon, 15 Feb 2021 11:42:48 +0000 (12:42 +0100)]
Fix assertion failure in cufa optimization with named args

Fixes oss-fuzz#30764.