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

141813 Commits

Author SHA1 Message Date
Peter Kokot
ecc602e3bb Remove non-existing INI directive detect_unicode (#18909)
The detect_unicode was removed and zend.detect_unicode was added in PHP
5.4 (bbf3d43c1e).
2025-06-23 23:44:20 +02:00
Peter Kokot
29e94f89db Autotools: Remove obsole Autoconf macros (#18914)
These Autoconf macros have been marked as obsolete in PHP-8.4 and now
also removed:
- PHP_AP_EXTRACT_VERSION
- PHP_BUILD_THREAD_SAFE
- PHP_DEF_HAVE
- PHP_OUTPUT
- PHP_TEST_BUILD
2025-06-23 23:43:52 +02:00
Niels Dossche
d8c48903c4 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-14082: Segmentation fault on unknown address 0x600000000018 in ext/opcache/jit/zend_jit.c
2025-06-23 22:29:00 +02:00
Niels Dossche
3664f4a859 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-14082: Segmentation fault on unknown address 0x600000000018 in ext/opcache/jit/zend_jit.c
2025-06-23 22:28:00 +02:00
Niels Dossche
1e3d92f8a9 Fix GH-14082: Segmentation fault on unknown address 0x600000000018 in ext/opcache/jit/zend_jit.c
During persisting, the JIT may trigger and fill in the call graph.
The call graph info is allocated on the arena which will be gone after preloading.
To prevent invalid accesses during normal requests, the arena data should be cleared.
This has to be done after all scripts have been persisted because shared op arrays between
scripts can change the call graph.

Closes GH-18916.
2025-06-23 22:27:36 +02:00
Daniil Gentili
591b3249da Do not use RTLD_DEEPBIND if dlmopen is available (#18612)
DL_LOAD now doesn't use RTLD_DEEPBIND deepbind anymore on platforms
where dlmopen with LM_ID_NEWLM is available:
this means shared library symbol isolation (if needed) must be enabled on
the user side when requiring libphp.so, by using dlmopen with LM_ID_NEWLM
instead of dlopen.
RTLD_DEEPBIND is still enabled when the Apache SAPI is in use.

Closes GH-10670.
2025-06-23 21:44:58 +02:00
Niels Dossche
6eed02bacc Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18899: JIT function crash when emitting undefined variable warning and opline is not set yet
2025-06-23 20:10:27 +02:00
Niels Dossche
56c4ddfaf6 Fix GH-18899: JIT function crash when emitting undefined variable warning and opline is not set yet
The crash happens because EX(opline) is attempted to be accessed but
it's not set yet.

Closes GH-18904.
2025-06-23 20:10:09 +02:00
Niels Dossche
9b7252b8bd Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18639: Internal class aliases can break preloading + JIT
2025-06-23 20:01:49 +02:00
Niels Dossche
ee2c0d7e7f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18639: Internal class aliases can break preloading + JIT
2025-06-23 20:01:40 +02:00
Niels Dossche
8e731ca622 Fix GH-18639: Internal class aliases can break preloading + JIT
ZEND_FUNC_INFO() can not be used on internal CE's. If preloading makes a
CE that's an alias of an internal class, the invalid access happens when
setting the FUNC_INFO.

While we could check the class type to be of user code, we can just skip
aliases altogether anyway which may be faster.

Closes GH-18915.
2025-06-23 20:01:15 +02:00
Niels Dossche
8493495361 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix misleading errors in printf()
  Unbreak PRINTF_DEBUG macro usages
2025-06-23 19:59:22 +02:00
Niels Dossche
eb78a0b53f Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix misleading errors in printf()
  Unbreak PRINTF_DEBUG macro usages
2025-06-23 19:59:16 +02:00
Niels Dossche
799ec7b8c5 Fix misleading errors in printf()
The precision and width _can_ be zero.

Closes GH-18911.
2025-06-23 19:58:49 +02:00
Niels Dossche
b50898894d Unbreak PRINTF_DEBUG macro usages
Clearly nobody has used this in a while given the compile errors and
warnings.
This patch fixes them so there are no errors nor warnings anymore.

Closes GH-18910.
2025-06-23 19:58:19 +02:00
Ilija Tovilo
ddfa743aba Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix leak when creating cycle in hook
2025-06-23 17:48:36 +02:00
Ilija Tovilo
fe504d3357 Fix leak when creating cycle in hook
This is necessary because the VM frees operands with the nogc variants. We
cannot just call gc_possible_root() because the object may no longer exist at
that point.

Fixes GH-18907
Closes GH-18917
2025-06-23 17:48:07 +02:00
Gina Peter Banyard
c7f0ac1bf9 ext/random: Remove useless tests (#18920) 2025-06-23 13:59:05 +01:00
Gina Peter Banyard
7f80d4dc7d ext/session: Remove bool type coercions in tests 2025-06-23 14:57:13 +02:00
Gina Peter Banyard
4baecc1d4a ext/simplexml: Remove bool type coercions in tests 2025-06-23 14:57:05 +02:00
Gina Peter Banyard
40be5fa99f ext/sockets: Remove bool type coercions in tests 2025-06-23 14:56:53 +02:00
Gina Peter Banyard
4ff8d9f6b4 ext/uri: Remove bool type coercions in tests (#18921) 2025-06-23 13:49:20 +01:00
Gina Peter Banyard
c26105d22e ext/posix: Remove ZPP tests 2025-06-23 14:30:08 +02:00
Gina Peter Banyard
8cd4f95ea3 ext/pcntl: Remove bool type coercions in tests 2025-06-23 14:29:59 +02:00
Gina Peter Banyard
b068bef45d ext/dom: Remove bool type coercions in tests 2025-06-23 14:29:52 +02:00
Gina Peter Banyard
c7778641dd ext/mbstring: Remove ZPP tests 2025-06-23 13:58:31 +02:00
Gina Peter Banyard
c03f6065fa ext/calendar: Remove ZPP test 2025-06-23 13:58:19 +02:00
Gina Peter Banyard
67bbf9c961 ext/filter: Remove ZPP test 2025-06-23 13:58:10 +02:00
David Carlier
0f55c20afd Merge branch 'PHP-8.4' 2025-06-23 11:47:10 +01:00
David Carlier
e3fe9a93c7 Merge branch 'PHP-8.3' into PHP-8.4 2025-06-23 11:46:45 +01:00
David Carlier
2ccd2b016d ext/calendar: jewishtojd overflow on year argument.
Upper limit set to the 7th millenium (Messianic Age) in the jewish calendar,
 around 2239 year in the gregorian calendar.

close GH-18849
2025-06-23 11:46:10 +01:00
Tim Düsterhus
81865ec5bd uri: Improve exceptions for Uri\WhatWg\Url (#18855)
A more specific exception message is used, while the code is simplified.
2025-06-23 12:14:00 +02:00
David Carlier
375316d0e2 ext/sqlite3: Sqlite3Result::fetchAll()
support associative and indexes arrays for results.

close GH-1884
2025-06-23 08:01:31 +01:00
David Carlier
22bd2ae63f ext/sqlite3: explain statement support addition.
similar to what have been done for pdo/sqlite as having statement
explain support to simulate how a query would operate or
for more advanced users, analysing the VM routines used
for possible optimisations.

close GH-18853
2025-06-23 07:57:45 +01:00
Saki Takamachi
e9310171f7 [skip ci] Add myself to EXTENSIONS (#18918) 2025-06-23 15:29:20 +09:00
DanielEScherzer
ddd33fd7e4 Generated arginfo headers: combine preprocessor conditional blocks (2) (#18667)
When global constants' or class constants' availability is based on some
preprocessor condition, the generated arginfo header files wrap the
declarations in the preprocessor `#if` conditional blocks, one per declaration,
even if they are in the same conditional block based on comments in the stub
file. Instead of having multiple conditional blocks one after the other with
the same condition, combine them into a single conditional block.
2025-06-22 14:35:28 -07:00
DanielEScherzer
4dfba7a250 [RFC] Final Property Promotion
https://wiki.php.net/rfc/final_promotion
2025-06-22 12:29:26 -07:00
David CARLIER
01c3001eb7 ext/tidy: zend_parse_parameters_none -> ZEND_PARSE_PARAMETERS_NONE macro (#18913) 2025-06-22 19:47:36 +01:00
Peter Kokot
4f1b005522 Autotools: Enable tsrmls cache in hash extension on big endian (#15303)
When system is detected as big endian this enables the TSRM Local
Storage static cache with the ZEND_ENABLE_STATIC_TSRMLS_CACHE
compilation flag. Previously it was enabled only on little endian
systems.
2025-06-22 16:03:55 +02:00
Peter Kokot
3df665a888 [Windows build] Remove redundant flags definitions (#18890)
The /d2FuncCache1 compile option is already added by
toolset_setup_common_cflags() in confutils.js to all targets.

ZEND_DVAL_TO_LVAL_CAST_OK was removed in
3725717de1.
2025-06-22 15:19:08 +02:00
Niels Dossche
b727821c79 Merge branch 'PHP-8.4'
* PHP-8.4:
  Fix GH-18901: integer overflow mb_split
2025-06-22 13:09:09 +02:00
Niels Dossche
2577e3a703 Merge branch 'PHP-8.3' into PHP-8.4
* PHP-8.3:
  Fix GH-18901: integer overflow mb_split
2025-06-22 13:08:05 +02:00
Niels Dossche
a5f21ca700 Fix GH-18901: integer overflow mb_split
We prevent signed overflow by making the count unsigned. The actual
interpretation of the count doesn't matter as it's just used to denote a
limit.

The test output for some limit values looks strange though, so that may
need extra investigation. However, that's orthogonal to this fix.

Closes GH-18906.
2025-06-22 13:07:43 +02:00
David Carlier
a2461021b6 Merge branch 'PHP-8.4' 2025-06-22 11:46:16 +01:00
David Carlier
0afe0bb777 Merge branch 'PHP-8.3' into PHP-8.4 2025-06-22 11:43:40 +01:00
David Carlier
2694eb9df0 Fixed GH-18902: ldap_exop/ldap_exop_sync assert triggered on empty request OID
close GH-18903
2025-06-22 11:41:23 +01:00
Niels Dossche
9b6df109c7 Don't use the obj_map cache for attributes (#18895) 2025-06-22 12:31:06 +02:00
Niels Dossche
479e9be45d Store hash table entry directly in dom_nnodemap_object
Splits the purpose of the baseobj_zv: now no longer either is an array
or an object. Stores the hash table pointer directly, if used.
2025-06-22 12:30:50 +02:00
Niels Dossche
8736342782 Pack dom_nnodemap_object fields together with a union that can't be active at the same time 2025-06-22 12:30:50 +02:00
Niels Dossche
26aea0ed37 Tweak sizes of some dom_nnodemap_object fields
We don't have to pack the bools, and the cached index would better be a
zend_long so we don't get implicit narrowing.
2025-06-22 12:30:50 +02:00