Commit Graph

13540 Commits

Author SHA1 Message Date
Ilija Tovilo
19063a84f0
Fix null static_variable_ptr for uncalled fake closures
Closes GH-8083
Closes GH-8109
2022-02-19 11:37:52 +01:00
Kamil Tekiela
2bae4e8dbb
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix bug GH-8058 - mysqlnd segfault when prepare fails
2022-02-14 12:02:57 +00:00
Kamil Tekiela
93a8d5cd17
Fix bug GH-8058 - mysqlnd segfault when prepare fails
Closes GH-8061
2022-02-14 11:45:17 +00:00
Jakub Zelenka
49087a65ee
Merge branch 'PHP-8.0' into PHP-8.1 2022-02-09 23:23:05 +00: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
Remi Collet
c03e111e6a
[ci skip] news 2022-02-08 13:54:35 +01:00
Christoph M. Becker
4a630e67e9
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fixed libpng warning when loading interlaced images
2022-02-08 10:48:21 +01: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
49466af4b6
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7980: Unexpected result for iconv_mime_decode
2022-02-07 14:31:21 +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
188a6ccd90
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Haiku fix ZTS build, disabling tls model
2022-02-07 13:07:12 +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
8009b216e9
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7953: ob_clean() only does not set Content-Encoding
2022-02-03 16:13:11 +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
Patrick Allaert
8db7fd8a2a
Bump for 8.1.4-dev 2022-02-03 02:21:29 +01:00
Sara Golemon
8a46311dbd
Bump for 8.0.17-dev 2022-02-02 23:44:02 +00:00
Christoph M. Becker
943d6f642a
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7978: sockets extension compilation errors
2022-01-21 23:59:26 +01: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
Christoph M. Becker
de4afc0fa7
[ci skip] Fix NEWS
The fix for GH-7842 was too late for 8.1.2RC1, so will be in 8.1.3
only.
2022-01-21 12:07:22 +01:00
Kamil Tekiela
1f0661d3e5
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Strip MariaDB 10 prefix
2022-01-19 21:45:19 +00:00
Kamil Tekiela
5fc0db989e
Strip MariaDB 10 prefix
Closes GH-7972
2022-01-19 21:39:42 +00:00
Ben Ramsey
6af65eac8d
Fix news entry for 8.1.2 2022-01-18 18:09:44 -06:00
Remi Collet
cdfc4d3596
Fix GH-7883 don't close not open file handle
don't create a stream if file is not open
2022-01-18 14:49:56 +01:00
Christoph M. Becker
69f6b09b2a
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7902: mb_send_mail may delimit headers with LF only
2022-01-18 13:09:52 +01: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
8d2ed194bf
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7896: Environment vars may be mangled on Windows
2022-01-17 23:45:49 +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
79bf39e917
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7875: mails are sent even if failure to log throws exception
2022-01-17 22:32:37 +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
Remi Collet
e31c54d025
fix GH-7899 Regression in unpack for negative int value 2022-01-13 11:47:19 +01:00
Christoph M. Becker
1632ebb542
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix GH-7867: FFI::cast() from pointer to array is broken
2022-01-10 23:59:55 +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
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
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
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
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
Kamil Tekiela
8869bbe0e9
Fix bug GH-7746 (mysqli_sql_exception->sqlstate is inaccessible)
Closes GH-7747
2021-12-30 14:23:06 +00: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