1
0
mirror of https://github.com/php/php-src.git synced 2026-04-14 03:22:58 +02:00
Commit Graph

60686 Commits

Author SHA1 Message Date
Dmitry Stogov
ca3f7b0a73 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix incorrect optimization of ASSIGN_OP that may lead to memory leak
2021-12-20 15:17:30 +03:00
Dmitry Stogov
e004e844f7 Fix incorrect optimization of ASSIGN_OP that may lead to memory leak
Fixes oss-fuzz #42506
2021-12-20 15:06:32 +03:00
Dmitry Stogov
3e842172d0 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix register clobbering
2021-12-20 12:49:52 +03:00
Dmitry Stogov
7c674e1aa7 JIT: Fix register clobbering
Fixes oss-fuzz #42657
2021-12-20 12:48:48 +03:00
Dmitry Stogov
c8d10a8243 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix type inference for INIT_ARRAY with invalid index
2021-12-20 11:46:36 +03:00
Dmitry Stogov
f18bb2477f Fix type inference for INIT_ARRAY with invalid index
Fixes oss-fuzz #42568
2021-12-20 11:40:11 +03:00
Christoph M. Becker
a000af6ecc Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix FILTER_FLAG_NO_RES_RANGE flag
2021-12-19 16:25:54 +01:00
Yifan Tong
3587e13ab3 Fix FILTER_FLAG_NO_RES_RANGE flag
`2001:10::/28` is a reserved IPv6 range. But there's a typo in GH-7476,
which caused IPv6 address like `240b:0010::1` will be filtered by the
flag `FILTER_FLAG_NO_RES_RANGE`.

http://www.faqs.org/rfcs/rfc6890.html

Closes GH-7790.
2021-12-19 16:24:34 +01:00
Dmitry Stogov
2745cd9997 Fix array clobbering by user error handler
Fixes oss-fuzz #42503
2021-12-17 12:49:58 +03:00
Dmitry Stogov
88cb659f1f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix incorrect type store elimination
2021-12-17 12:32:49 +03:00
Dmitry Stogov
66306030ad JIT: Fix incorrect type store elimination
Fixes oss-fuzz #42388
2021-12-17 12:31:48 +03:00
Christoph M. Becker
5910e1d6cd Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #81679: Tracing JIT crashes on reattaching
2021-12-15 15:39:58 +01:00
Christoph M. Becker
49380b59d2 Fix #81679: Tracing JIT crashes on reattaching
When a new process reattaches to OPcache, tracing JIT causes segfaults,
because each new process allocates its own `zend_jit_traces` and
`zend_jit_exit_groups` in SHM, although these need to be shared between
all processes.

We solve that by only allocating these structs for the first process,
and store the pointers in `accel_shared_globals`, so we can reassign
them when a new process reattaches.

Closes GH-7776.
2021-12-15 15:37:23 +01:00
Dmitry Stogov
1a6863c6af Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Preloading: don't remove INCLUDE_OE_EVAL nstructions with used result
2021-12-14 11:37:25 +03:00
Dmitry Stogov
cd8e6f5f7b Preloading: don't remove INCLUDE_OE_EVAL nstructions with used result 2021-12-14 11:36:33 +03:00
Dmitry Stogov
0314f40c2d Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Tracing JIT: Fix reference counting
2021-12-13 16:34:32 +03:00
Dmitry Stogov
fe320e83ae Tracing JIT: Fix reference counting
Fixes oss-fuzz #42225
2021-12-13 16:28:45 +03:00
Dmitry Stogov
76075823e7 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix array clobering by user error handler
2021-12-13 15:20:16 +03:00
Dmitry Stogov
cbc0b1afeb Fix array clobering by user error handler
Fixes oss-fuzz #42234
2021-12-13 14:59:30 +03:00
Dmitry Stogov
f8f0a650a7 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix incorrect optimization that leads to memory leak
2021-12-13 13:09:05 +03:00
Dmitry Stogov
230de7721f Fix incorrect optimization that leads to memory leak
Fixes oss-fuzz #42221
2021-12-13 13:08:05 +03:00
Dmitry Stogov
1f03debb68 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix crash during compilation of function with incompletely constructed SSA
2021-12-13 11:51:41 +03:00
Dmitry Stogov
e79dbe1124 JIT: Fix crash during compilation of function with incompletely constructed SSA
Fixes oss-fuzz #42200
2021-12-13 11:49:51 +03:00
Christoph M. Becker
c35be03628 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
2021-12-12 22:38:55 +01:00
Christoph M. Becker
c435e67746 Fix GH-7765: php_oci_cleanup_global_handles segfaults at second call
We must not use the TSRM accessor macros in GINIT and GSHUTDOWN, but
rather use the passed pointers directly.  For simplicity, we inline
`php_oci_cleanup_global_handles()`, and also the `PHP_OCI_CALL()`
macros; the latter are unlikely to be needed here, but don't hurt.

Closes GH-7766.
2021-12-12 22:38:00 +01:00
Christoph M. Becker
a708db9c8a Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7759: Incorrect return types for hash() and hash_hmac()
2021-12-12 15:47:19 +01:00
Christoph M. Becker
0b3a937670 Fix GH-7759: Incorrect return types for hash() and hash_hmac()
`hash()` and `hash_hmac()` never return `false`; only `hash_file()` and
`hash_hmac_file()` return `false` in case the data cannot be read.

Closes GH-7760.
2021-12-12 15:39:55 +01:00
Christoph M. Becker
926dee1b6f Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix error message allocation of PDO PgSQL
2021-12-12 15:18:32 +01:00
SATO Kentaro
778513f605 Fix error message allocation of PDO PgSQL
Closes GH-7723.
2021-12-12 15:17:36 +01:00
Christoph M. Becker
f19250a3a1 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix openssl_x509_checkpurpose_basic.phpt
2021-12-12 14:28:16 +01:00
Christoph M. Becker
2c2b0abd4a Merge branch 'PHP-7.4' into PHP-8.0
* PHP-7.4:
  Fix openssl_x509_checkpurpose_basic.phpt
2021-12-12 14:27:07 +01:00
Christoph M. Becker
98175fc7f1 Fix openssl_x509_checkpurpose_basic.phpt
This test fails because san-cert.pem and san-ca.pem have expired.  We
fix that by using the CertificateGenerator to generate temporary certs
during the test run.  Since san-cert.pem and san-ca.pem have been
identical, we only generate one certificate.

Closes GH-7763.
2021-12-12 14:26:17 +01:00
Christoph M. Becker
7daf01258d Fix GH-7748: gethostbyaddr outputs binary string
`getnameinfo(3)` returns zero on success; all other values need to be
regarded as failure.
2021-12-10 17:38:36 +01:00
Dmitry Stogov
cfcee97ad6 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Remove range inference for booleans.
2021-12-10 14:33:36 +03:00
Dmitry Stogov
6f42c073cf Remove range inference for booleans.
Range inference for bolleans and longs comparison was incorrect.

Fizes oss-fuzz #fuzz-42161.php
2021-12-10 14:32:47 +03:00
Dmitry Stogov
363434bab2 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix incorrect JMP optimization
2021-12-10 01:44:55 +03:00
Dmitry Stogov
0ac3d78d7d Fix incorrect JMP optimization
Fixes oss-fuzz #42155
2021-12-10 01:39:28 +03:00
Christoph M. Becker
7d4fdf1510 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Skip bug_36798.phpt for PDO_DBLIB
2021-12-07 20:25:35 +01:00
Christoph M. Becker
efb901ebed Skip bug_36798.phpt for PDO_DBLIB
For some reason, this test fails now with "Incorrect syntax near ''.
[SELECT '�' as test FROM test WHERE id = '1']", so we skip it.
2021-12-07 20:24:15 +01:00
Christoph M. Becker
6f325104eb Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix #75917: SplFileObject::seek broken with CSV flags
2021-12-06 19:02:32 +01:00
Aliaksandr Bystry
daf79e2d91 Fix #75917: SplFileObject::seek broken with CSV flags
Closes GH-7697.
2021-12-06 18:59:48 +01:00
Dmitry Stogov
572c09d373 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed incorrect DCE of a constructor call
2021-12-06 16:00:30 +03:00
Dmitry Stogov
7b629afe4e Fixed incorrect DCE of a constructor call
Fixez oss-fuzz #42049
2021-12-06 15:59:30 +03:00
Dmitry Stogov
b4ccc52d10 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  JIT: Fix incorrect elimination of type store
2021-12-06 14:22:59 +03:00
Dmitry Stogov
c29f6baaee JIT: Fix incorrect elimination of type store
Fixes oss-fuzz #41995
2021-12-06 14:22:07 +03:00
Dmitry Stogov
5459ed4c2f Fix use after free because of data clobbering by user error handler
Fixes oss-fuzz #41692
2021-12-06 13:08:27 +03:00
Dmitry Stogov
4ed10f3d47 Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix refcount inferemce ($a += $a returns old array with RCN)
2021-12-06 11:31:51 +03:00
Dmitry Stogov
aa7280264e Fix refcount inferemce ($a += $a returns old array with RCN)
Fixes oss-fuzz #41670
2021-12-06 11:30:03 +03:00
Nikita Popov
26e424465c Fix bug #81598: Use C.UTF-8 as LC_CTYPE locale by default
Unfortunately, libedit is locale based and does not accept UTF-8
input when the C locale is used. This patch switches the default
locale to C.UTF-8 instead (if it is available). This makes libedit
work and I believe it shouldn't affect behavior of single-byte
locale-dependent functions that PHP otherwise uses.

Closes GH-7635.
2021-12-05 21:03:27 +01:00
David Carlier
15e7e570a5 Fix #81658: MYSQL_OPT_LOAD_DATA_LOCAL_DIR not available in MariaDB
This also introduces the boolean userland constant `MYSQLI_IS_MARIADB`.
2021-12-05 19:11:04 +01:00