Commit Graph

134004 Commits

Author SHA1 Message Date
Niels Dossche
1492be5286
[RFC] DOM HTML5 parsing and serialization support (#12111) 2023-11-13 20:18:19 +01:00
Niels Dossche
17d2917fb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:49 +01:00
Niels Dossche
5c25742c26 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12655: proc_open() does not take into account references in the descriptor array
2023-11-13 19:34:40 +01:00
Niels Dossche
86c7d3ed1f Fix GH-12655: proc_open() does not take into account references in the descriptor array
Closes GH-12658.
2023-11-13 19:29:44 +01:00
David CARLIER
cc2bf11951
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic arrays. (#12650)
zend: introducing ZEND_ELEMENT_COUNT for struct's dynamic and flexible arrays.

It is mostly for ubsan and helping array bound checking.
2023-11-13 12:42:45 +00:00
Dmitry Stogov
350a692271 Merge branch 'PHP-8.3'
* PHP-8.3:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:33:55 +03:00
Dmitry Stogov
8349835e68 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:28:48 +03:00
Dmitry Stogov
db26aee801 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660)
2023-11-13 13:27:11 +03:00
Dmitry Stogov
c60c2a0d67
Backport fix for GH-12512: JIT Assertion `info & (1 << type)' failed (#12660) 2023-11-13 13:26:17 +03:00
Jakub Zelenka
dee6a8f815
Merge branch 'PHP-8.3' 2023-11-12 18:18:43 +00:00
Jakub Zelenka
3b68df24bd
Add note to UPGRADING about proc_open changes for invalid command
Closes GH-12589
2023-11-12 18:17:10 +00:00
Ilija Tovilo
f8c2d1ec2f
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:17 +01:00
Ilija Tovilo
a687465c45
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix astat imperciseness excemption in test
2023-11-12 14:07:10 +01:00
Ilija Tovilo
d224faa10f
Fix astat imperciseness excemption in test 2023-11-12 14:06:02 +01:00
Ilija Tovilo
a785b2fac0
Merge branch 'PHP-8.3'
* PHP-8.3:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:08 +01:00
Ilija Tovilo
d5a25d51fc
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Disable -fsanitize=function on Clang 17
2023-11-11 21:11:02 +01:00
Ilija Tovilo
ca22505c8c
Disable -fsanitize=function on Clang 17
Closes GH-12642
2023-11-11 21:09:45 +01:00
Ilija Tovilo
a202bf54df
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix undeclared variable in stat tests
2023-11-11 21:01:26 +01:00
Ilija Tovilo
85107c94d1
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix undeclared variable in stat tests
2023-11-11 21:01:19 +01:00
Ilija Tovilo
7440a1bd1f
Fix undeclared variable in stat tests
Closes GH-12645
2023-11-11 21:00:50 +01:00
Niels Dossche
f150f99752
Improve browscap get_browser performance (#12651)
* Split function and use _new variant to avoid redundant checks

* Precompute better array size to avoid rehashing

* Use new function to add into array instead of merging into, preventing temporary memory allocations

* Convert to regex without separate copy + lowering

We're already doing a character-wise loop after lowering, so just lower
it character by character instead of looping over it twice and
allocating memory.

* Use HASH_MAP loop because htab can never be packed

This saves additional checks.

* Move destructor to more sensible place

* Remove now unused browscap_zval_copy_ctor

* Use zend_string_release_ex variant where possible

* Implement dedicated greedy wildcard matching algorithm

This avoids compiling, allocating and caching regexes and should run in
the same complexity.

* Cache previous length instead of repeatedly recomputing it

* Add additional optimization to wildcard * matching

* Move cheap checks to the callsite

The function prologue and epilogue have a stupidly high overhead for
those 2 simple checks at the start.

We can't always-inline the reg_compare function because it contains
alloca, and the alloca is really important for performance.
Instead, move those cheap checks to the call site.

* Use specialised loop to avoid unnecessary conversions and checks

* Optimize counting loop by taking into account the prefix

* Precompute the hash values of known keys

* [ci skip] UPGRADING

* Code style

* Add a note why we have the early-skip checks in the loop
2023-11-11 18:44:17 +01:00
Niels Dossche
299a234eb7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:41 +01:00
Niels Dossche
1fb73463d3 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12621: browscap segmentation fault when configured in the vhost
2023-11-11 18:36:32 +01:00
Niels Dossche
7353c7ce17 Fix GH-12621: browscap segmentation fault when configured in the vhost
The temporary HashTable has a destructor that releases the string held
by the entry's value. However, browscap_intern_str(_ci) only incremented
the refcount for the reference created by the return value. As the
HashTable is only used during parsing, we don't need to manage the
reference count of the value anyway, so get rid of the destructor.

This is triggerable in two cases:
 - When using php_admin_value to set the ini at the activation stage
 - When running out of space for the opcache-interned strings

Closes GH-12634.
2023-11-11 18:35:57 +01:00
Niels Dossche
b3e10df1f7 Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
2023-11-11 17:04:48 +01:00
Niels Dossche
608842b5b7 Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
2023-11-11 17:04:37 +01:00
Niels Dossche
333cf3c111 Fix GH-12635: Test bug69398.phpt fails with ICU 74.1
ICU 74.1 contains new locale data that breaks the test.
Split the test based on the version number to resolve the issue.

Closes GH-12653.
2023-11-11 17:04:01 +01:00
Arnaud Le Blanc
8f424dd36b
Test that objects free handler call zend_weakrefs_notify (#12546) 2023-11-11 13:53:35 +01:00
Niels Dossche
9bb341d1b1 [ci skip] Add myself to CODEOWNERS for ext/xsl
I'm able to review code for this and I'd like to get notified on PRs.
2023-11-10 17:30:19 +01:00
David Carlier
994d19d500 Merge branch 'PHP-8.3' 2023-11-10 16:08:08 +00:00
Dmitriy Degtyaryov
63898008c0 Fix GH-9344: pgsql pipeline mode proposal.
Adding pg_send_flush_request.
Fix freeze after next execute pg_send_* on PQgetResult in _php_pgsql_link_has_results.
Set nonblocking for pipelining mode.
No flush client buffer in pg_send_* for pipelining mode.

Close GH-12644
2023-11-10 16:06:04 +00:00
Ilija Tovilo
60ca5a0c1e
Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix timezone dependent test
2023-11-10 12:11:36 +01:00
Ilija Tovilo
677db1b0de
Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix timezone dependent test
2023-11-10 12:11:27 +01:00
Ilija Tovilo
d316712baa
Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix timezone dependent test
2023-11-10 12:11:17 +01:00
SakiTakamachi
6a43135c1d
Fix timezone dependent test
Closes GH-12637
2023-11-10 12:10:30 +01:00
Jakub Zelenka
311cae03e7
Merge branch 'PHP-8.3' 2023-11-10 09:46:25 +00:00
Jakub Zelenka
d02a8f4e87
Separate setting of SO_KEEPALIVE in FPM tests
Closes GH-12640
2023-11-10 09:45:19 +00:00
Niels Dossche
490b80858d Merge branch 'PHP-8.3'
* PHP-8.3:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
2023-11-10 00:13:15 +01:00
Niels Dossche
e6fef2944b Merge branch 'PHP-8.2' into PHP-8.3
* PHP-8.2:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
2023-11-10 00:12:47 +01:00
Niels Dossche
fbda6b50a3 Merge branch 'PHP-8.1' into PHP-8.2
* PHP-8.1:
  Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
  Fix GH-12628: The gh11374 test fails on Alpinelinux
2023-11-10 00:08:09 +01:00
SakiTakamachi
2a4775d6a7 Fix GH-12633: sqlite3_defensive.phpt fails with sqlite 3.44.0
Removes 'PRAGMA writable_schema;'.

From sqlite changelog https://www.sqlite.org/releaselog/3_44_0.html:
> The SQLITE_DBCONFIG_DEFENSIVE setting now prevents PRAGMA writable_schema
> from being turned on.
> Previously writable_schema could be turned on, but would not actually allow
> the schema to be writable. Now it simply cannot be turned on.

Closes GH-12636.
2023-11-10 00:03:33 +01:00
Niels Dossche
78fba9cb80 Fix GH-12628: The gh11374 test fails on Alpinelinux
Closes GH-12636.
2023-11-10 00:01:22 +01:00
Dmitry Stogov
a1cd010b12 Fix mistakes introduced in 886dd7c06f 2023-11-10 01:18:19 +03:00
Máté Kocsis
1f6770abf0
Remove unused stream filter resource name 2023-11-09 22:44:02 +01:00
Dmitry Stogov
886dd7c06f Improve fix for GH-12512: JIT Assertion `info & (1 << type)' failed 2023-11-09 23:21:38 +03:00
Jakub Zelenka
5492f0ae8f
Merge branch 'PHP-8.3' 2023-11-09 13:39:52 +00:00
Jakub Zelenka
42ea0ca3db
Merge branch 'PHP-8.2' into PHP-8.3 2023-11-09 13:38:55 +00:00
Jakub Zelenka
c6eeb83e1f
Merge branch 'PHP-8.1' into PHP-8.2 2023-11-09 13:32:33 +00:00
Daniil Gentili
10b2b4a52c
Fix memory leak in standard syslog device handling
The BG(syslog_device) is leaked in RINIT.

Closes GH-12501
2023-11-09 13:29:09 +00:00
Ilija Tovilo
1e5241d49b
[skip ci] Re-unparallelize odbc tests
SQL Server frequently deadlocks. Parallelization of these jobs, at least in CI,
is not worthwhile because there are enough tests to run in parallel for the few
workers available.
2023-11-09 11:22:15 +01:00