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

126612 Commits

Author SHA1 Message Date
Dmitry Stogov
56430ef667 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix incorrect FETCH_THIS elimination
2022-01-10 15:40:06 +03:00
Dmitry Stogov
4170d41a66 JIT: Fix incorrect FETCH_THIS elimination
Fizex oss-fuzz #43159
2022-01-10 15:37:36 +03:00
David Carlier
be22018f35 Fix pcntl_rfork build for DragonFlyBSD
RFTSIGZMB flag unsupported, guarding with the said flag instead of system
in case the implementaion catches up with FreeBSD's.

Closes GH-7918.
2022-01-10 13:10:30 +01:00
Christoph M. Becker
4833362844 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81430: Attribute instantiation leaves dangling pointer
2022-01-10 12:42:18 +01:00
Benjamin Eberlei
2f6a06ccb0 Fix #81430: Attribute instantiation leaves dangling pointer
By switching attribute constructor stackframe to be called via
trampoline the stack allocation is not causing dangling pointers
in the zend_observer API anymore.

Co-Authored-By: Florian Sowade <f.sowade@suora.com>
Co-Authored-By: Christopher Becker <cmbecker69@gmx.de>
Co-Authored-By: Dmitry Stogov <dmitry@zend.com>

Closes GH-7885.
2022-01-10 12:40:15 +01:00
Christoph M. Becker
2b07513192 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix memory leak on invalid port
2022-01-08 21:06:39 +01:00
David Carlier
c99a026c9c Fix memory leak on invalid port
Closes GH-7911.
2022-01-08 21:04:55 +01:00
Christoph M. Becker
0a9f552911 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix ODBC test which may not properly clean up
2022-01-07 19:25:23 +01:00
Christoph M. Becker
9781085782 Fix ODBC test which may not properly clean up
If these tests fail with a fatal error, they won't properly clean up,
which likely causes other tests to fail as (several ODBC tests use the
`odbcTEST` database and tables or stored procedures named `FOO`).  This
is particularly annoying during development, where you would need to
clean up manually.

We fix this by moving the cleanup code to the --CLEAN-- section, so
that this code is executed no matter what.

Closes GH-7886.
2022-01-07 19:23:57 +01:00
Máté Kocsis
62e4ac9439 Add support for custom property links
Closes GH-7892
2022-01-07 08:28:26 +01:00
Máté Kocsis
0462719999 Fix class synopsis generation
Closes GH-7891
2022-01-06 18:31:21 +01:00
Stefano Arlandini
46bec6de42 Fix the OpenMetrics response format returned by the FPM status page
Closes GH-7843, closes GH-7842
2022-01-04 23:01:10 +00:00
Patrick Allaert
4ae75623fd Preparing for 8.1.3-dev 2022-01-04 19:29:41 +01:00
Christoph M. Becker
623b21220b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix ext/sockets build on Haiku
2022-01-04 14:12:56 +01:00
David Carlier
09165ace37 Fix ext/sockets build on Haiku
The `SOCK_RDM` datagram option is unsupported on Haiku; instead `ifreq`
has direct access to `ifr_index`.

Closes GH-7849.
2022-01-04 14:10:50 +01:00
Ilija Tovilo
15466edb8b Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  [ci skip] Fix GH-7725: Adjust README instructions on referencing issues
  Prepare for PHP 8.0.16
2022-01-04 13:49:52 +01:00
Ilija Tovilo
f1d7f95702 [ci skip] Fix GH-7725: Adjust README instructions on referencing issues
Also remove some references to git.php.net which is not used anymore.

Closes GH-7882.
2022-01-04 13:45:22 +01:00
Gabriel Caruso
d70c69839c Prepare for PHP 8.0.16 2022-01-04 09:40:46 -03:00
Jeremie Courreges-Anglas
70b02d75f2 riscv64 support for fibers
We add riscv64 assembly files from Boost, needed for fibers support,
and hook up riscv64 fibers support during configure.

Closes GH-7879.
2022-01-04 12:06:37 +01:00
Máté Kocsis
f70ca0acd4 Mark mysqli_driver properties readonly 2022-01-04 08:41:02 +01:00
Máté Kocsis
96a5026bfd Redefine PDOException::$code with correct type
Closes GH-7839
2022-01-01 17:54:59 +01:00
Christoph M. Becker
694c44a0dc [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  mysqli_next_result_no_repeat_error.phpt must not use --EXTENSIONS--
2021-12-31 00:27:15 +01:00
Christoph M. Becker
d963b3f015 mysqli_next_result_no_repeat_error.phpt must not use --EXTENSIONS--
This is only properly supported as of PHP 8.1.0[1], and may cause
spurious test failures for older versions[2].

[1] <https://github.com/php/php-src/pull/6787>
[2] <https://ci.appveyor.com/project/php/php-src/builds/42044075/job/tk4138s43p1953hx>
2021-12-31 00:24:56 +01:00
Kamil Tekiela
b51f51952a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix formatting in the new mysqli test
2021-12-30 19:28:35 +00:00
Kamil Tekiela
49512b6b36 Fix formatting in the new mysqli test 2021-12-30 19:25:32 +00:00
Christoph M. Becker
ae9e98640a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug where large bigints may be truncated
2021-12-30 19:10:36 +01:00
NathanFreeman
b3903515bf Fix bug where large bigints may be truncated
Unless stringified results are requested, we need to parse large
bigints as unsigned, to avoid wrap-around behavior.

Co-authored-by: Christoph M. Becker <cmbecker69@gmx.de>

Closes GH-7837.
2021-12-30 19:07:36 +01:00
Nikita Popov
b63e4cf727 Handle holes in zend_get_opcode_id()
Some opcodes may currently not be allocated.
2021-12-30 16:56:03 +01:00
Kamil Tekiela
8869bbe0e9 Fix bug GH-7746 (mysqli_sql_exception->sqlstate is inaccessible)
Closes GH-7747
2021-12-30 14:23:06 +00:00
Máté Kocsis
24be11f632 Remove bogus type of $object param in SplObjectStorage::offsetSet()
This parameter definitely only accepts objects, so we shouldn't explicitly
mark it as mixed. Looks like I accidentally added this type when adding
the tentative return type.

Closes GH-7840
2021-12-28 18:01:26 +01:00
Dmitry Stogov
c69b9426ff Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  iSeparate tests
  JIT: Fix array clobbering by user error handler
2021-12-28 17:00:40 +03:00
Dmitry Stogov
206bcff50d iSeparate tests 2021-12-28 16:56:23 +03:00
Dmitry Stogov
fd879e6fe4 JIT: Fix array clobbering by user error handler
Gixes oss-fuzz #43055
2021-12-28 16:51:03 +03:00
Christoph M. Becker
5d4bef0d0c Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix buffer allocations in zlog_stream_set_msg_suffix()
2021-12-28 13:28:55 +01:00
David Carlier
cb3d858745 Fix buffer allocations in zlog_stream_set_msg_suffix()
If that code was used, there would be a UAF scenario.

Closes GH-7835.
2021-12-28 13:27:54 +01:00
Dmitry Stogov
8862e23098 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix reference contig inference
2021-12-28 10:00:14 +03:00
Dmitry Stogov
de358f856f Fix reference contig inference
Fixes oss-fuzz #43032
2021-12-28 09:57:03 +03:00
Christoph M. Becker
b36f25ad10 [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Don't truncate subsecond precision in run-tests.php JUNIT output
2021-12-27 22:30:53 +01:00
Christoph M. Becker
87d9e02f01 Don't truncate subsecond precision in run-tests.php JUNIT output
When run-tests.php has been typed[1], the type of `$time` has been
chosen to be `int`.  This, however, leads to truncation, and the
somewhat relevant subsecond precision is lost.  We fix that by
changing the type to `float`, although `int|string` would be more
appropriate, but requires PHP ≥ 7.4.0.  Another option would be to
move the `number_format()` formatting into `junit_mark_test_as()`.

[1] <11274f53e7>

Closes GH-7836.
2021-12-27 22:15:33 +01:00
Christoph M. Becker
d58c48d45d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
2021-12-27 21:10:40 +01:00
Christoph M. Becker
ee610947ce Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This reverts commit 76e2a8380e.  Cf.
<76e2a8380e (r62560239)>.
2021-12-27 21:08:51 +01:00
Christoph M. Becker
d4c07df4df Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix zend_observer_fcall_end_all() accessing dangling pointers
2021-12-27 18:20:48 +01:00
Florian Sowade
76e2a8380e Fix zend_observer_fcall_end_all() accessing dangling pointers
This may happen, when the execute_data was allocated on the stack.  We
ensure that the runtime cache pointer is not NULL before dereferencing
it.

This is a partial fix for bug 81430.

Closes GH-7665.
2021-12-27 18:19:13 +01:00
David Warner
f82593d597 Fix GH-7815: php_uname doesn't recognise latest Windows versions
We check `dwBuildNumber` to determine newer Windows versions.

Closes GH-7816.
2021-12-27 15:08:11 +01:00
Christoph M. Becker
187e011710 [ci skip] Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug40228*.phpt conflict
2021-12-26 23:28:29 +01:00
Christoph M. Becker
7f0a1e2f2d Fix bug40228*.phpt conflict
Both tests use the same directory structure; we avoid that by
extracting to separate subdirectories.

Closes GH-7831.
2021-12-26 23:23:56 +01:00
Christoph M. Becker
710dc03399 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Mark curl tests using http2.golang.org as XFAIL
2021-12-26 22:29:17 +01:00
Christoph M. Becker
5005445994 Mark curl tests using http2.golang.org as XFAIL
http2.golang.org/serverpush has been retired[1], so we need to come up
with an alternative.  Until then, we mark the relevant tests as XFAIL
(although bug77535.phpt passes, what might be an indication that the
test needs further revision).  To avoid waiting for the timeout, we
also unconditionally skip these tests for now.

[1] <https://github.com/golang/go/issues/49301>

Closes GH-7829.
2021-12-26 22:27:15 +01:00
Christoph M. Becker
0cd1741004 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Prevent strict interpretation of tentative definition
2021-12-26 16:42:33 +01:00
Christoph M. Becker
e76ddbd2f6 Prevent strict interpretation of tentative definition
This header declaration is never supposed to be interpreted as
definition; otherwise, the handlers are not properly initialized, what
happens, for instance, with ASan instrumented MSVC builds.

Closes GH-7827.
2021-12-26 16:41:25 +01:00