1
0
mirror of https://github.com/php/php-src.git synced 2026-03-24 16:22:37 +01:00
Commit Graph

135741 Commits

Author SHA1 Message Date
Niels Dossche
acdf63b999 Get rid of error gotos in HTML5 parse conversion 2024-04-28 10:32:41 +02:00
Máté Kocsis
3876225763 Fix casing of NULL default values 2024-04-27 23:45:55 +02:00
David Carlier
243827b83f Fix GH-13519: another attempt after the faulty fix.
Close GH-14055
2024-04-27 12:15:59 +01:00
Dmitry Stogov
8e4363de55 Update IR
IR commit: 3b35a1fd61b2b72da8a0852549880d2aff391dbe
2024-04-26 23:53:27 +03:00
Dmitry Stogov
bad5d2c78a Update IR
IR commit: ae34ae52b7b1c359afa03a0a1f45cbf689a64471
2024-04-26 02:40:42 +03:00
Niels Dossche
3626e2d552 Get rid of remaining usages of zval_try_get_string() (#14041)
This isn't necessary because the cases where we use it will always
succeed because the properties always have the type string|null.
2024-04-24 23:47:10 +02:00
Gina Peter Banyard
f68d72527a UPGRADING 2024-04-24 15:39:47 +01:00
Gina Peter Banyard
c96e8946e1 ext/mbstring: Check encoding passed to mb_http_output() has no null bytes 2024-04-24 15:39:47 +01:00
Gina Peter Banyard
86dfbadc06 ext/mbstring: Always pass length to php_mb_get_encoding_or_pass()
We have access to this information, so propagate it instead of calling strlen().
This also removes the newly introduced _ex() variant.
2024-04-24 15:39:47 +01:00
Gina Peter Banyard
b61479bb28 ext/mbstring: Pass string length to _php_mb_ini_mbstring_http_output_set() 2024-04-24 15:39:47 +01:00
Niels Dossche
a70786304b [ci skip] UPGRADING 2024-04-24 09:10:13 +02:00
Niels Dossche
f81370847c Fix GH-13815: mb_trim() inaccurate $characters default value (#13820)
Because the default characters are defined in the stub file, and the
stub file is UTF-8 (typically), the characters are encoded in the string
as UTF-8. When using a different character encoding, there is a mismatch
between what mb_trim expects and the UTF-8 encoded string it gets.

One way of solving this is by making the characters argument nullable,
which would mean that it always uses the internal code path that has the
unicode codepoints that are defaulted actually stored as codepoint
numbers instead of in a string.

Co-authored-by: @ranvis
2024-04-24 09:07:55 +02:00
Gina Peter Banyard
13a5a8126e ext/gmp: Fix leading whitespace before explicit octal prefix 2024-04-23 23:39:48 +01:00
Gina Peter Banyard
4719ef258f ext/gmp: Improve error message 2024-04-23 23:39:48 +01:00
Dmitry Stogov
71194ea767 Update IR
IR commit: 65586bd4cf9cd2d3b41492f52823c5083cea77e4
2024-04-23 23:14:54 +03:00
Jakub Zelenka
b6cf38836f Merge branch 'PHP-8.3' 2024-04-23 19:28:58 +01:00
Jakub Zelenka
bab75e1f5c PHP 8.3 is now for PHP-8.3.8-dev 2024-04-23 19:27:29 +01:00
Sergey Panteleev
77d38d33d5 Merge branch 'refs/heads/PHP-8.3'
* refs/heads/PHP-8.3:
  PHP-8.2 is now for PHP 8.2.20-dev
2024-04-23 17:24:06 +03:00
Sergey Panteleev
3a252b2849 Merge branch 'refs/heads/PHP-8.2' into PHP-8.3
* refs/heads/PHP-8.2:
  PHP-8.2 is now for PHP 8.2.20-dev

# Conflicts:
#	Zend/zend.h
#	configure.ac
#	main/php_version.h
2024-04-23 17:23:26 +03:00
Sergey Panteleev
3b5321dffe PHP-8.2 is now for PHP 8.2.20-dev 2024-04-23 17:22:54 +03:00
Arnaud Le Blanc
6d285e3d08 [ci skip] UPGRADING 2024-04-23 11:58:51 +02:00
Arnaud Le Blanc
9bbc195d11 Remove zend_strtod mutex (#13974)
`zend_strtod.c` uses a global state (mostly an allocation freelist) protected by a mutex in ZTS builds. This state is used by `zend_dtoa()`, `zend_strtod()`, and variants. This creates a lot of contention in concurrent loads. `zend_dtoa()` is used to format floats to string, e.g. in sprintf, json_encode, serialize, uniqid.

Here I move the global state to the thread specific `executor_globals` and remove the mutex.

The impact on non-concurrent environments is null or negligible, but there is a considerable speed up on concurrent environments, especially on Alpine/Musl.
2024-04-23 11:52:38 +02:00
Julien Voisin
07337df1d7 Add two checks for zend_mm_heap's integrity (#13943) 2024-04-23 11:50:24 +02:00
Niels Dossche
bffab33a89 Update Lexbor (#14032) 2024-04-22 23:19:42 +02:00
David Carlier
3a300e9213 ext/pcntl: signals list update for dragonflybsd related to checkpoint.
- SIGCKPT checkpoint and continue.
- SIGCKPTEXIT checkpoint and exit.

Close GH-14011
2024-04-22 21:21:52 +01:00
Peter Kokot
a27cdd65f3 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
2024-04-22 21:23:15 +02:00
Peter Kokot
71aae5a17e Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
2024-04-22 21:22:28 +02:00
Peter Kokot
44775b7617 Fix GH-13727: Building with -Werror=strict-prototypes (#14029)
This is addon to the GH-13727 bug fix. When configuring the build with:

  ./configure CFLAGS=-Werror=strict-prototypes

libtool check for parsing nm command would fail:

  checking command to parse /usr/bin/nm -B output from cc object... failed

Upstream libtool has this specific check already fixed. Note that this
works only with Autoconf version 2.72 and later and is preparation for
future compilers that might have this error enabled by default.
2024-04-22 21:21:40 +02:00
Ilija Tovilo
8a7d79da90 Merge branch 'PHP-8.3'
* PHP-8.3:
  Temporary reset filename and lineno override before autoload
2024-04-22 10:58:02 +02:00
Ilija Tovilo
5899cabff0 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Temporary reset filename and lineno override before autoload
2024-04-22 10:57:47 +02:00
SATO Kentaro
f8b9030b4e Temporary reset filename and lineno override before autoload
Closes GH-10232
Closes GH-13313
2024-04-22 10:56:45 +02:00
Laurent Arnoud
3f0b204f5a cli: allow to change ~/.php_history with PHP_HISTFILE
Closes GH-13313
2024-04-22 10:05:47 +02:00
Peter Kokot
7151855d67 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix erroneous dnl appended in configure (#14013)
2024-04-21 17:24:51 +02:00
Peter Kokot
f28ddec540 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix erroneous dnl appended in configure (#14013)
2024-04-21 17:23:58 +02:00
Peter Kokot
7d3d8de1f3 Fix erroneous dnl appended in configure (#14013)
This is a backport of commit 03f15534a1 to
PHP-8.2 due to GH-14002 and fixes the PHP_CXX_COMPILE_STDCXX check in
ext/intl whether the specified C++ standard is mandatory or optional.

The `dnl` (Discard to Next Line) M4 macro in this combination of `m4_if`
macros and arguments isn't properly replaced and a literal `dnl` string
is appended in the configure script. The `[]dnl` works ok.
2024-04-21 17:23:22 +02:00
Ilija Tovilo
76a254a19e Merge branch 'PHP-8.3'
* PHP-8.3:
  [skip ci] Backport 0e7ef95 and 4f0d4c0
2024-04-21 16:14:00 +02:00
Ilija Tovilo
2f64d07337 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  [skip ci] Backport 0e7ef95 and 4f0d4c0
2024-04-21 16:13:21 +02:00
Ilija Tovilo
891e4a5a34 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  [skip ci] Backport 0e7ef95 and 4f0d4c0
2024-04-21 16:12:18 +02:00
Ilija Tovilo
469ad32581 [skip ci] Backport 0e7ef95 and 4f0d4c0 2024-04-21 16:11:55 +02:00
Niels Dossche
dd1a32dc1c NEWS
Closes GH-13782.
2024-04-21 16:08:26 +02:00
Niels Dossche
43cbeb3bf0 Add an assertion for certainty 2024-04-21 16:07:40 +02:00
Niels Dossche
bb8234d2bd Use php_stream_auto_cleanup() consistently 2024-04-21 16:07:40 +02:00
Niels Dossche
0b69c3aea4 Fix crash in shutdown when using a named pipe with a persistent mysqli connection
The code originally posted in GH-10599 triggers the bug for
non-persistent connections, but changing the host to `p:.` reveals that
there is also a crash bug for persistent connections.
2024-04-21 16:07:40 +02:00
Niels Dossche
a20d9d72b1 Factor common code out into mysqlnd_fixup_regular_list()
This prevents the code from getting desynced again, which was the reason
for the leak of GH-10599.
2024-04-21 16:07:40 +02:00
Niels Dossche
319fb50eca Fix memory leak in mysqlnd_vio::open_pipe
This fixes the memory leak part of GH-10599.
2024-04-21 16:07:40 +02:00
Niels Dossche
06b87f912b Remove broken hack in mysqlnd_vio::close_stream
What happens is that the persistent network stream resource gets freed, yet
stays inside EG(persistent_list). This causes a crash on shutdown when the
persistent list is getting cleared, as the engine will try to free the network
stream again.

The code in close_stream gets confused between persistent vs
non-persistent allocations when EG(active) is false.
This code was introduced in c3019a1 to fix crashes when the persistent list
gets destroyed before module shutdown is called. This is indeed a potential
problem that was fixed on the master branch in 5941cda.

This fixes the crash reason of GH-10599.
2024-04-21 16:07:39 +02:00
Ilija Tovilo
4f0d4c0872 [skip ci] Also skip all other push jobs on non php-src 2024-04-21 16:00:48 +02:00
Ilija Tovilo
0e7ef95a0a [skip ci] Also skip benchmarking on non php-src 2024-04-21 02:22:57 +02:00
Ilija Tovilo
c3b07a6e5e Adjust nightly org restriction check
Check for the specific repository.

Closes GH-14026
2024-04-21 02:13:49 +02:00
Niels Dossche
b3700e29cc Simplify prop handler of XMLReader (#14023)
As XMLReader only exposes a single class, and the property handlers are
statically set, we don't need to store the pointer to the property
handler table inside the object.
This simplifies the code and reduces the memory required for XMLReader.
2024-04-20 23:22:38 +02:00