Commit Graph

135759 Commits

Author SHA1 Message Date
Ilija Tovilo
d52605db15
Replace xhtml image with base64 data 2024-04-30 14:10:46 +02:00
Ilija Tovilo
cb55588a7e
Skip online tests by default
Fixes GH-14058
Closes GH-14070
2024-04-30 14:10:46 +02:00
Ilija Tovilo
7f3fd30c3b
[skip ci] Fix intl test on 32-bit machines 2024-04-30 11:40:32 +02:00
David Carlier
1cf4cc3894
ext/intl: IntlDateFormatter::parseToCalendar addition.
Unlike IntlDateFormatter::parse, the timezone is updated
accordingly.

Close GH-13779
2024-04-29 18:55:00 +01:00
David Carlier
5823a96f1e
ext/gettext: update arguments handling.
using zend_string whenever relevant too.

Close GH-13582.
2024-04-29 18:38:34 +01:00
Ilija Tovilo
782af7a963
Fix -Walloc-size warning
It's indeed unsafe to treat zend_internal_function as zend_function, because
sizeof(zend_internal_function) < sizeof(zend_function), which can lead to buffer
overflows. This might also be UB.

Either way, this would need to be addressed in the whole codebase.
2024-04-29 16:36:24 +02:00
Ilija Tovilo
529a71ff2e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix __SANITIZE_ADDRESS__ redeclaration warning
2024-04-29 16:14:24 +02:00
Ilija Tovilo
5bac4a6471
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix __SANITIZE_ADDRESS__ redeclaration warning
2024-04-29 16:14:16 +02:00
Ilija Tovilo
d670e131df
Fix __SANITIZE_ADDRESS__ redeclaration warning 2024-04-29 16:13:49 +02:00
David CARLIER
32936c518a
ext/pcntl: porting pcntl cpu affinity api to netbsd. (#14056) 2024-04-29 13:54:07 +01:00
Niels Dossche
ed916214c4
Avoid additional allocation in Document\createElementNS (#14071)
For the following benchmark code:
```php
$dom = DOM\XMLDocument::createEmpty();
for ($i = 0; $i < 1000*100; $i++) $dom->createElementNS("urn:a", "thisisaveryverylongname");
```

We obtain the following on an i7-4790:
```
Benchmark 1: ./sapi/cli/php bench.php
  Time (mean ± σ):      34.5 ms ±   1.2 ms    [User: 31.4 ms, System: 2.9 ms]
  Range (min … max):    32.4 ms …  39.3 ms    84 runs

Benchmark 2: ./sapi/cli/php_old bench.php
  Time (mean ± σ):      36.6 ms ±   1.6 ms    [User: 33.6 ms, System: 2.9 ms]
  Range (min … max):    34.3 ms …  45.3 ms    80 runs

Summary
  ./sapi/cli/php bench.php ran
    1.06 ± 0.06 times faster than ./sapi/cli/php_old bench.php
```
2024-04-29 08:39:44 +02:00
Adam Saponara
956c3c2c03
ext/openssl: Add option to load legacy algorithm provider
OpenSSL 3.x relegated a set of insecure algorithms to a "legacy"
provider which is not loaded by default. Some of these algorithms
have utility beyond encryption such as for hashing, e.g., DES[1]

Add a compile-time option to load the legacy provider in 3.x. When
enabled, also load the default provider because loading any provider
explicitly disables auto-loading the default provider.

[1] 9e40015748/go/vt/vtgate/vindexes/hash.go (L157)

Closes GH-13951
2024-04-28 14:52:45 +01:00
Máté Kocsis
afd91fb9ac
Migrate ext/odbc resources to opaque objects (#12040)
Co-authored-by: Niels Dossche <7771979+nielsdos@users.noreply.github.com>
2024-04-28 15:45:56 +02:00
Pascal Christen
57cd23d6d0
Adjust zlog warning and error message in kqueue (#14053) 2024-04-28 13:18:06 +01:00
David CARLIER
d5d227a43a
[ci skip] ext/sockets: followup on #14065. (#14066)
freebsd supports SO_NOSIGPIPE too.
2024-04-28 13:01:49 +01:00
David Carlier
b147a22bb8
ext/sockets: adding SO_NOSIGPIPE constant.
it s the macOs way to disable the SIGPIPE signal emission, same
 as doing `signal(SIGPIPE, SIG_IGN)` but on the socket level.

Close GH-14065
2024-04-28 12:01:03 +01:00
Niels Dossche
b0da6ed6ee
Be specific for the namespace of the id attribute (#14060) 2024-04-28 11:40:54 +02:00
Niels Dossche
a86e668764 Improve performance of text node allocation by marking the text node construction as always inline 2024-04-28 10:32:41 +02:00
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