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

123114 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
Till Backhaus
29fe06fa59 Fix bug #76109: Implement fpm_scoreboard_copy
fpm_scoreboard_copy locks the scoreboard while copying the scoreboard and all
proc scoreboards. proc scoreboards are locked one by one while copying each
struct. The old implementation (inside fpm_handle_status_request) only briefly
locked the scoreboard while copying the scorebard.

Closes GH-7931

Co-authored-by: Jakub Zelenka <bukka@php.net>
2022-02-09 23:02:45 +00:00
Dmitry Stogov
c035298eb2 Free cached chunks when the requested memory limit is above real usage 2022-02-08 15:45:40 +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
David Carlier
bea542a953 Haiku fix ZTS build, disabling tls model
Closes GH-8047.
2022-02-07 13:05:54 +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
Sara Golemon
8a46311dbd Bump for 8.0.17-dev 2022-02-02 23:44:02 +00:00
Dmitry Stogov
478448d271 JIT: Fix register alloction (missed store)
Fixes oss-fuzz #44242
2022-02-01 22:00:39 +03:00
Dmitry Stogov
a60a9b4a89 Fix memory leak
Fixes oss-fuzz #44222
2022-02-01 16:24:22 +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
Dmitry Stogov
464e725bb5 Fix typo (wrong string length)
Fixes oss-fuzz #44110
2022-01-28 11:04:51 +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
93a3c71eb4 Fix GH-7896: Environment vars may be mangled on Windows
When bug 77574[1] has been fixed, the fix only catered to variables
retrieved via `getenv()` with a `$varname` passed, but neither to
`getenv()` without arguments nor to the general import of environment
variables into `$_ENV` and `$_SERVER`.  We catch up on this by using
`GetEnvironmentStringsW()` in `_php_import_environment_variables()` and
converting the encoding to whatever had been chosen by the user.

[1] <https://bugs.php.net/bug.php?id=75574>

Closes GH-7928.
2022-01-17 23:44:41 +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
Joe Watkins
d7db5f6e21 Fix TSRM ignoring done 2022-01-11 03:51:06 +01: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
David Carlier
c99a026c9c Fix memory leak on invalid port
Closes GH-7911.
2022-01-08 21:04:55 +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
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
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
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
de358f856f Fix reference contig inference
Fixes oss-fuzz #43032
2021-12-28 09:57:03 +03: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
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