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

58217 Commits

Author SHA1 Message Date
Dmitry Stogov 7434909dc6 Fix type inference
Fixes oss-fuzz #44407
2022-02-11 13:03:36 +03:00
Dmitry Stogov 0d6b173532 JIT: Fix missed type store
Fizes oss-fuzz #44376
2022-02-11 12:05:57 +03:00
Dmitry Stogov d0f965d078 Tracing JIT: Fixed incorrect deoptimization info 2022-02-11 11:10:22 +03:00
Dmitry Stogov 82bb169a08 Tracing JIT: Fixed incorrect deoptimization info
Fixes oss-fuzz #44294
2022-02-11 11:08:19 +03:00
Brett 1d48da6da5 Fixed libpng warning when loading interlaced images
We enable interlace transform when reading png.

Closes GH-8002.
2022-02-08 10:46:50 +01:00
Christoph M. Becker 86c196ba7f Fix GH-7980: Unexpected result for iconv_mime_decode
We need to reset the shift state right after conversion, to cater to
potenially following plain encodings.  Also, there is no need to reset
the shift for plain encodings, because these are not state-dependent.

Closes GH-8025.
2022-02-07 14:28:57 +01:00
Christoph M. Becker 9bd468da63 Fix GH-7953: ob_clean() only does not set Content-Encoding
If an output handler has not yet been started, calling `ob_clean()`
causes it to start.  If that happens, we must not forget to set the
`Content-Encoding` and `Vary` headers.

Closes GH-7960.
2022-02-03 16:09:00 +01:00
Dmitry Stogov 478448d271 JIT: Fix register alloction (missed store)
Fixes oss-fuzz #44242
2022-02-01 22:00:39 +03:00
Dmitry Stogov 54c952f11f JIT: Fix incorrect type store elimination
Fixes oss-fuzz #43737
2022-01-28 16:27:55 +03:00
Dmitry Stogov f711c9603d Fix incorrect register allocation
Fixes oss-fuzz #44006
2022-01-28 13:08:11 +03:00
Dmitry Stogov 965dafe3e1 Fix too aggressive DCE that leads to memory leak
Fixes oss-fuzz #43738
2022-01-28 12:17:46 +03:00
David Carlier 07aaa34cd4 Fix GH-7978: sockets extension compilation errors
We fix the `ucred` detection when custom `CFLAGS` are in use.

Closes GH-7981.
2022-01-21 23:56:56 +01:00
Kamil Tekiela 82b883034c Fix coding style from previous commit 2022-01-20 11:17:18 +00:00
Kamil Tekiela 5fc0db989e Strip MariaDB 10 prefix
Closes GH-7972
2022-01-19 21:39:42 +00:00
Christoph M. Becker 03816fba46 Fix GH-7902: mb_send_mail may delimit headers with LF only
Email headers are supposed to be separated with CRLF. Period.

We introduce a `CRLF` macro for better comprehensibility right away.

Closes GH-7907.
2022-01-18 13:08:08 +01:00
Christoph M. Becker 478edcdacb Fix GH-7875: mails are sent even if failure to log throws exception
We explicitly check for an exception after the logging attempt, and
bail out in that case.

Co-authored-by: Tim Düsterhus <timwolla@googlemail.com>

Closes GH-7878.
2022-01-17 22:30:25 +01:00
Dmitry Stogov ee8f9d75c0 JIT: Fix trace type inference
Fixes oss-fuzz #43597
2022-01-14 16:43:50 +03:00
Dmitry Stogov 079c5af9ec JIT: Fix register allocation
Fixes oss-fuzz #43598
2022-01-14 13:41:16 +03:00
Dmitry Stogov f7c3f6e7e2 Fix ext/zend_test/tests/observer_bug81430_2.phpt failure 2022-01-12 12:08:59 +03:00
Dmitry Stogov 522406c0ec JIT: Fix incorrect flag check
Fixes oss-fuzz #43538
2022-01-11 22:23:44 +03:00
Dmitry Stogov d8b0337cff Fix register allocation on x86
Fixes oss-fuzz #43119
2022-01-11 13:02:55 +03:00
Christoph M. Becker 703cac33db Fix GH-7867: FFI::cast() from pointer to array is broken
Casting from pointer to array is special, so we must not fall back to
the general FFI casting.  There is a particular issue regarding the
size comparison, namely that the pointer size is always 8 for 64bit
architectures, but the size of an array is determined by its
declaration, so as is casting a pointer to an array with more than 8
elements would fail, but casting to an array with less than 9 elements
succeeds, but the internal pointer would point to some arbitrary
memory.

We fix this by properly supporting the cast.  An alternative would be
to deny this kind of cast generally, since it is not necessarily safe.
However, FFI isn't necessarily safe anyway.

We also check pointer/array type compatibility when casting.

Co-authored-by: Dmitry Stogov <dmitry@zend.com>

Closes GH-7876.
2022-01-10 23:58:39 +01:00
Dmitry Stogov 1f58365438 Fix type inference
Fixes oss-fuzz #43367
2022-01-10 21:53:35 +03:00
Dmitry Stogov 698ac23711 Fixed NAN handling in SCCP
Fixes oss-fuzz #43341
2022-01-10 19:39:19 +03:00
Dmitry Stogov 71d6501346 Added test 2022-01-10 16:05:40 +03:00
Dmitry Stogov b80d30d821 Fix type inference for assign to string offset with invalid index.
Fixes oss-fuzz #43277
2022-01-10 16:03:54 +03:00
Dmitry Stogov 4170d41a66 JIT: Fix incorrect FETCH_THIS elimination
Fizex oss-fuzz #43159
2022-01-10 15:37:36 +03: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 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
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
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 49512b6b36 Fix formatting in the new mysqli test 2021-12-30 19:25:32 +00: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
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
Dmitry Stogov de358f856f Fix reference contig inference
Fixes oss-fuzz #43032
2021-12-28 09:57:03 +03:00
Christoph M. Becker ee610947ce Revert "Fix zend_observer_fcall_end_all() accessing dangling pointers"
This reverts commit 76e2a8380e.  Cf.
<https://github.com/php/php-src/commit/76e2a8380e5e030412e9d565955d011972af8418#r62560239>.
2021-12-27 21:08:51 +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
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 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 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
Christoph M. Becker fd3fc5c193 Fix GH-7826: Inconsistent argument name in hash_hmac_file and hash_file
Like `hash_file()`, `hash_hmac_file()` expects a filename, and not some
string data.  Fixing this now, constitutes a (hopefully small) BC break
though.

Closes GH-7828.
2021-12-26 12:55:53 +01:00
Christoph M. Becker b4ba65dd9d Fix chunk_split_variation*_32bit.phpt for Windows
Both tests fail on Windows for slightly different reasons, what appears
to be legit, and as such we fix the test expectations.

Closes GH-7830.
2021-12-26 12:05:52 +01:00
Dmitry Stogov 2b81156f2a Fix memory leak in SCCP
Fixes oss-fuzz #42878
2021-12-24 13:10:22 +03:00
David Carlier 3f0bb67361 Avoid void* arithmetic in sockets/multicast.c on NetBSD
On NetBSD, ifconf.ifc_buf member, unlike most of platforms, is a void
pointer.

We also fix the cpuinfo declarations with empty parameter lists.

Closes GH-7819.
2021-12-23 16:17:30 +01:00
Christophe Coevoet 096a01c905 [ci skip] Update the min curl version in the sync-constants.php script
PHP 8.0 bumped the min curl version to 7.29.0

Closes GH-7805.
2021-12-23 13:43:32 +01:00
Christoph M. Becker c5f4ee50ab $context parameter of get_headers() is nullable
Closes GH-7813.
2021-12-23 11:47:20 +01:00
David Carlier 80b02275bb socket cmsg credential test fixes, "backporting" from the FreeBSD PR. 2021-12-21 07:27:59 +01:00
David Carlier 51647eb23e socket: ancillary credentials build fix for non linux systems.
for systems using SO_PASSCRED sockopt flag but not using ucred struct.
2021-12-21 07:25:43 +01:00
Dmitry Stogov cb10ac1d53 Fixed compilation warning 2021-12-21 00:02:45 +03:00