Commit Graph

123838 Commits

Author SHA1 Message Date
Remi Collet
9ba3c367f7
fix litespeed build 2021-05-06 15:57:38 +02:00
K
efe79e0de6
Simplify unpack logic (#6908)
- move endiannes check to compile time
- remove php_unpack function
- the compiler take care of sign extension
2021-05-06 15:20:05 +02:00
Christoph M. Becker
66ad7095b0
Merge branch 'PHP-8.0'
* PHP-8.0:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:51:02 +02:00
Christoph M. Becker
fb2bf8bd58
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add simple Firebird payload fake server to test suite
2021-05-06 14:50:22 +02:00
Christoph M. Becker
f95f8a3c1e
Add simple Firebird payload fake server to test suite
This is meant to test against certain fixed responses of Firebird
servers.  For now we add just a most basic test which verifies a
connection attempt.

Closes GH-6940.
2021-05-06 14:47:57 +02:00
Nikita Popov
9ff8d362b3 Merge branch 'PHP-8.0'
* PHP-8.0:
  opcache: more reliable way to get the current binary on solaris/illumos
2021-05-06 14:34:28 +02:00
David Carlier
d87d2f006c opcache: more reliable way to get the current binary on solaris/illumos
Closes GH-6920.
2021-05-06 14:33:53 +02:00
Remi Collet
f9547f2b47
get rid of inet_aton and inet_ntoa use inet_ntop iand inet_pton where available standardize buffer size 2021-05-06 13:39:58 +02:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Nikita Popov
13467bdcc0 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81015
2021-05-06 10:47:22 +02:00
Nikita Popov
dd3e56ba24 Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fixed bug #81015
2021-05-06 10:46:30 +02:00
Nikita Popov
178bbe3478 Fixed bug #81015
Make sure that the previous opline is part of the same block,
otherwise it may be non-dominating.

The test case does not fail on PHP-7.4, but I think the general
problem can appear on 7.4 as well, so I'm applying the patch to
that branch.
2021-05-06 10:46:00 +02:00
Aaron Piotrowski
779fe8e43a
Check current_execute_data instead of flags in fiber destructor
Checking EG(current_exectue_data) throws into the previous fiber instead of triggering a fatal error during shutdown. A fatal error is triggered only if the throwing destroyed fiber was resumed from {main}.
2021-05-05 10:48:30 -05:00
Nikita Popov
f9ac667b98 Merge branch 'PHP-8.0'
* PHP-8.0:
  Fixed bug #81007
2021-05-05 16:54:06 +02:00
Nikita Popov
bf9dc53435 Fixed bug #81007
Backport a change from the master branch. We usually test 32-bit
using -m32 from an x86-64 host, probably nobody tried using an
actual 32-bit host.
2021-05-05 16:53:43 +02:00
Máté Kocsis
7df7867624
Merge branch 'PHP-8.0'
* Fix the signature of PDOStatement::fetchObject()
2021-05-05 16:51:23 +02:00
Máté Kocsis
068c8db276
Fix the signature of PDOStatement::fetchObject()
The ?array $ctorArgs = null parameter is changed to array $constructorArgs = [], and an additional memory leak revealed by the new test case is fixed.

Closes GH-6937

Co-Authored-By: Nikita Popov <nikita.ppv@gmail.com>
2021-05-05 16:48:22 +02:00
Christoph M. Becker
1779f6838d
Merge branch 'PHP-8.0'
* PHP-8.0:
  Add CONFLICTS file for PDO firebird tests
2021-05-05 15:26:23 +02:00
Christoph M. Becker
9e51b487f3
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Add CONFLICTS file for PDO firebird tests
2021-05-05 15:24:58 +02:00
Nikita Popov
896e4d3428
Add CONFLICTS file for PDO firebird tests
Just in case anybody executes these test in parallel on PHP 7.4.

(cherry picked from commit b4ffe54174)

Closes GH-6943.
2021-05-05 15:24:30 +02:00
George Peter Banyard
27d40da95d Convert IMAPConnection to IMAP\Connection 2021-05-05 14:22:43 +01:00
Christoph M. Becker
f932d3d356
Merge branch 'PHP-8.0'
* PHP-8.0:
  Update version in php_version.h as well
2021-05-05 15:21:21 +02:00
Christoph M. Becker
8294ad3295
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Update version in php_version.h as well
2021-05-05 15:20:37 +02:00
Christoph M. Becker
125fc0b8d4
Update version in php_version.h as well
The version there is automatically updated during `./configure`, but
not on Windows.
2021-05-05 15:18:46 +02:00
Nikita Popov
fb374f56a7 Rethrow exceptions in fiber destructor
We need to make sure that HANDLE_EXCEPTION is set when the fiber
throws during destruction.

Fixes oss-fuzz #33875.
2021-05-05 12:49:47 +02:00
Nikita Popov
c15dc63ad2 Merge branch 'PHP-8.0'
* PHP-8.0:
  openssl_pkcs7_read: input is data not filename
2021-05-05 09:50:11 +02:00
Vincent JARDIN
bb0107b63d openssl_pkcs7_read: input is data not filename
The argument should be an input string and not a filename.

Fix: https://github.com/php/doc-en/pull/559
Suggested-by: George Peter Banyard <girgias@php.net>

Closes GH-6942.
2021-05-05 09:49:53 +02:00
Sara Golemon
230ccda431 Merge branch 'PHP-8.0'
* PHP-8.0:
  Reset for 8.0.7
2021-05-04 17:18:40 +00:00
Sara Golemon
f020d537b0
Reset for 8.0.7 2021-05-04 17:17:20 +00:00
Christoph M. Becker
592cfa309e
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #81011: mb_convert_encoding removes references from arrays
2021-05-04 18:40:23 +02:00
Christoph M. Becker
d1c0cbdcb1
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #81011: mb_convert_encoding removes references from arrays
2021-05-04 18:39:39 +02:00
Christoph M. Becker
0cafd53d18
Fix #81011: mb_convert_encoding removes references from arrays
We need to dereference references.

Closes GH-6938.
2021-05-04 18:37:40 +02:00
Nikita Popov
4411026217 Close generator already in dtor phase
In the added test case, the Closure ends up being freed before
the generator during GC.

This patch closes the generator (and thus releases the held
closure / execute_data) already during dtor_obj, which will avoid
ordering issues in free_obj. dtor_obj is not always called, but
if it isn't, then we also won't run GC and will free_obj in
reverse construction order.

Fixes oss-fuzz #33947.
2021-05-04 16:59:59 +02:00
Nikita Popov
2aac616071 Merge branch 'PHP-8.0'
* PHP-8.0:
  Don't treat failed assignment as initialization
2021-05-04 14:46:52 +02:00
Nikita Popov
398cfb982e Don't treat failed assignment as initialization
Only reset the uninitialized property flag once the type check
has succeeded. Previously the property was treated as unset rather
than uninitialized after a failed assignment.

Noticed this edge-case while working on accessors...
2021-05-04 14:46:04 +02:00
Derick Rethans
d2e989d176 Merge branch 'PHP-8.0' 2021-05-04 12:18:53 +01:00
Derick Rethans
5ce0fa2129 Merge branch 'PHP-7.4' into PHP-8.0 2021-05-04 12:18:41 +01:00
Derick Rethans
0328ff49cc Reset PHP-7.4 for 7.4.20 2021-05-04 12:18:27 +01:00
Nikita Popov
31c74aaeeb Use EXTENSIONS instead of SKIPIF section 2021-05-03 18:37:42 +02:00
Christoph M. Becker
895185e5ea
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #79100: Wrong FTP error messages
2021-05-03 15:25:17 +02:00
Christoph M. Becker
c2a06f5d9a
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #79100: Wrong FTP error messages
2021-05-03 15:24:17 +02:00
Christoph M. Becker
42c72ef463
Fix #79100: Wrong FTP error messages
First we need to properly clear the `inbuf`, what is an amendment to
commit d2881adcbc[1].

Then we need to report `php_pollfd_for_ms()` failures right away; just
setting `errno` does not really help, since at least in some cases it
would have been overwritten before we actually could check it.  We use
`php_socket_strerror()` to get a proper error message, and define
`ETIMEDOUT` to the proper value on Windows; otherwise we catch the
definition in errno.h, which is not compatible with WinSock.  The
proper solution for this issue would likely be to include something
like ext/sockets/windows_common.h.

Finally, we ensure that we only report warnings using `inbuf`, if it is
not empty.

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

Closes GH-6718.
2021-05-03 15:19:57 +02:00
Máté Kocsis
e2ad44357e
Merge branch 'PHP-8.0'
* Fix the default value of $mode in PDOStatement::fetch*()
2021-05-03 13:08:36 +02:00
Máté Kocsis
30d3062c9b
Fix the default value of $mode in PDOStatement::fetch*()
Closes GH-6933
2021-05-03 13:06:38 +02:00
Christoph M. Becker
768e8b8319
Merge branch 'PHP-8.0'
* PHP-8.0:
  Fix #73246: XMLReader: encoding length not checked
2021-05-03 12:30:29 +02:00
Christoph M. Becker
645815c5b7
Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix #73246: XMLReader: encoding length not checked
2021-05-03 12:29:24 +02:00
Christoph M. Becker
272df442f5
Fix #73246: XMLReader: encoding length not checked
libxml2 expects the passed encoding to be NUL terminated, so we reject
strings with NUL bytes right away.

Closes GH-6899.
2021-05-03 12:26:37 +02:00
Kamil Tekiela
54222a6fe4
Implement mysqli_fetch_column (#6798)
* Implement mysqli_fetch_column
2021-05-01 20:11:47 +01:00
Aaron Piotrowski
810fb59f66
Improve fiber backtraces
The start/resume/throw execute_data is now attached as the prev_execute_data to the bottom frame of the fiber stack when the fiber is running.
2021-04-30 12:17:50 -05:00
Aaron Piotrowski
f3465e6740
Minor fiber fixes
Assert error is fatal when calling zend_error_suspend_fiber.

Added missing static.

Removed .S extension from output of configure.
2021-04-30 10:08:01 -05:00