#
fb2443ac |
| 18-Dec-2024 |
David Carlier |
ext/posix posix_ttyname/posix_isatty fd error handling update. Set to `EBADF` errno for posix_ttyname when out of ranges. posix_fpathconf now returns false on out of range file descripto
ext/posix posix_ttyname/posix_isatty fd error handling update. Set to `EBADF` errno for posix_ttyname when out of ranges. posix_fpathconf now returns false on out of range file descriptors. close GH-17209
show more ...
|
#
e69317b5 |
| 17-Dec-2024 |
Ilija Tovilo |
Reduce gc stack usage for strings (and resources) Adding strings to the worklist is useless, because they never contribute to cycles. The assembly size on x86_64 does not change. This si
Reduce gc stack usage for strings (and resources) Adding strings to the worklist is useless, because they never contribute to cycles. The assembly size on x86_64 does not change. This significantly improves performance in this synthetic benchmark by 33%. function test($a) {} $a = new stdClass(); $a->self = $a; $a->prop1 = str_repeat('a', 10); $a->prop2 = str_repeat('a', 10); $a->prop3 = str_repeat('a', 10); $a->prop4 = str_repeat('a', 10); $a->prop5 = str_repeat('a', 10); $a->prop6 = str_repeat('a', 10); $a->prop7 = str_repeat('a', 10); $a->prop8 = str_repeat('a', 10); $a->prop9 = str_repeat('a', 10); $a->prop10 = str_repeat('a', 10); for ($i = 0; $i < 10_000_000; $i++) { test($a); gc_collect_cycles(); } This requires adding IS_TYPE_COLLECTABLE to IS_REFERENCE_EX to ensure these values continue to be pushed onto the stack. Luckily, IS_TYPE_COLLECTABLE is currently only used in gc_check_possible_root(), where the checked value cannot be a reference. Note that this changes the output of gc_collect_cycles(). Non-cyclic, refcounted values no longer count towards the total reported values collected. Also, there is some obvious overlap with GH-17130. This change should be good nonetheless, especially if we can remove the GC_COLLECTABLE(Z_COUNTED_P(zv)) condition in PHP 9 and rely on Z_COLLECTABLE_P() exclusively, given we can assume an object doesn't become cyclic at runtime anymore. Closes GH-17194
show more ...
|
#
18ba9833 |
| 17-Dec-2024 |
Gina Peter Banyard |
[skip ci] Add UPGRADING entry for GH-17173
|
#
b53b5298 |
| 17-Dec-2024 |
Gina Peter Banyard |
ext/pcntl: Refactor `pcntl_exec()` (#17172) * Refactor usage of strlcpy As we allocate the buffer, we know the string will fit inside the buffer. * Throw ValueErrors when s
ext/pcntl: Refactor `pcntl_exec()` (#17172) * Refactor usage of strlcpy As we allocate the buffer, we know the string will fit inside the buffer. * Throw ValueErrors when strings contain null bytes The underlying C calls work with C strings, which are NULL terminated. * exec_pcntl() always return false Thus, update stubs to formally have a return type of `false`.
show more ...
|
#
c8bbb2b5 |
| 16-Dec-2024 |
Gina Peter Banyard |
[skip ci] Add upgrading entry for GH-17177
|
#
6972612e |
| 16-Dec-2024 |
Christoph M. Becker |
Improve fix for GH-16889 The original patch[1] cared only about pipe handles in the rset, but would be problematic if there are other handles (e.g. files in the rset, or pipes/files
Improve fix for GH-16889 The original patch[1] cared only about pipe handles in the rset, but would be problematic if there are other handles (e.g. files in the rset, or pipes/files in the other sets), because `php_select()` would return immediately, reporting all non read-pipe handles as ready, but possibly never reporting read-pipe handles. We fix this by applying different logic for the case where only pipe handles are supplied in the rset, but no handles in the wset or eset. In this case `php_select()` only returns when actually one of the handles is ready, or when the timeout expires. To avoid busy looping in this case, we sleep for a short amount of time. This matches POSIX behavior. In all other cases, `php_select()` behaves as before (i.e. prior to the original fix), that is it returns immediately, reporting all handles as ready. We also add a test case that demonstrates multiplexing the output of a couple of child processes. See also the discussion on <https://github.com/php/php-src/pull/16917>. [1] <https://github.com/php/php-src/commit/b614b4a69ae7bab13c39af2f4a01dea846dfa307> Closes GH-17174.
show more ...
|
#
85f69a7a |
| 10-Dec-2024 |
Tim Düsterhus |
zend_hrtime: Use `clock_gettime_nsec_np()` for macOS if available (#17089) As per the Apple developer documentation: > Prefer to use the equivalent clock_gettime_nsec_np(CLOCK_UPTIM
zend_hrtime: Use `clock_gettime_nsec_np()` for macOS if available (#17089) As per the Apple developer documentation: > Prefer to use the equivalent clock_gettime_nsec_np(CLOCK_UPTIME_RAW) in > nanoseconds. and also > This API has the potential of being misused to access device signals to try > to identify the device or user, also known as fingerprinting. Regardless of > whether a user gives your app permission to track, fingerprinting is not > allowed. When you use this API in your app or third-party SDK (an SDK not > provided by Apple), declare your usage and the reason for using the API in > your app or third-party SDK’s PrivacyInfo.xcprivacy file. see https://developer.apple.com/documentation/kernel/1462446-mach_absolute_time
show more ...
|
#
5a482a13 |
| 03-Dec-2024 |
Ilija Tovilo |
Fix enum to bool comparison The compiler compiles $value == true to ZEND_BOOL, which always returns true for objects (with the default cast_object handler). However, when compared to a
Fix enum to bool comparison The compiler compiles $value == true to ZEND_BOOL, which always returns true for objects (with the default cast_object handler). However, when compared to a statically unknown rhs $value == $true, the resulting opcode ZEND_IS_EQUAL would call the objects compare handler. The zend_objects_not_comparable() handler, which is installed for enums and other internal classes, blanketly returns false. This does not match the ZEND_BOOL semantics. Object to boolean comparison is now handled directly in zend_compare(), analogous to object to null comparison. It continuous to call the cast_object handler, but guarantees consistent behavior across ZEND_BOOL and ZEND_IS_EQUAL. Fixes GH-16954 Closes GH-17031
show more ...
|
#
03731570 |
| 02-Dec-2024 |
Christoph M. Becker |
Fix GH-16843: Windows phpize builds ignore source subfolders phpize builds on Windows ignore the paths of extension sources, and build all object files in the same folder. This can't wo
Fix GH-16843: Windows phpize builds ignore source subfolders phpize builds on Windows ignore the paths of extension sources, and build all object files in the same folder. This can't work if there are multiple source files with the same base name stored in separate folders and registered as such (e.g. cls/worker.c and src/worker.c). While extension authors can work around by avoiding duplicate base names, they may not even be aware of the problem because on POSIX systems, the object files are usually placed right besides the sources. Thus we take the relative path (from `configure_module_dirname`) of the source files into account even for phpize builds. Since this may break some extension builds (especially those which use Makefile fragments), we do not apply this fix to stable branches. Closes GH-17016.
show more ...
|
#
d98e1918 |
| 07-Dec-2024 |
Christoph M. Becker |
[skip ci] Fix UPGRADING --enable-sanitizer is not supported with MSVC 16.9, but only 16.10.
|
#
c9cc89cd |
| 30-Nov-2024 |
Christoph M. Becker |
Support --enable-sanitizer for MSVC builds While it is already possible to enable ASan for MSVC (assuming Visual Studio 2019 16.10 or later) by passing `/fsanitizer=address` in the `
Support --enable-sanitizer for MSVC builds While it is already possible to enable ASan for MSVC (assuming Visual Studio 2019 16.10 or later) by passing `/fsanitizer=address` in the `CFLAGS`, it is only usable if `ZEND_DEBUG` is also enabled; otherwise there are `STATUS_BACK_STACK` errors all the time. Since it makes some sense to combine ASan instrumentation with debug assertions enabled anyway (typical for fuzzing), we support the configure option `--enable-sanitizer`, which is already supported for Clang builds, also for MSVC builds. Note that MSVC supports only ASan for now; contrary to Clang which additionally supports UBSan on Windows. Since ASan reports can be pretty useless without debug symbol information, we require such builds to also produce PDBs (i.e. `--enable-debug-pack`), but forbid actual debug builds (for performance reasons, and because the way it is implemented it would not make sense; that was already an issue with Clang builds with sanitizers enabled). Closes GH-16999.
show more ...
|
#
f6a0bb4d |
| 02-Dec-2024 |
Tim Düsterhus |
Support Closures in constant expressions (#16458) RFC: https://wiki.php.net/rfc/closures_in_const_expr Co-authored-by: Volker Dusch <volker@tideways-gmbh.com> Co-authored-by: Il
Support Closures in constant expressions (#16458) RFC: https://wiki.php.net/rfc/closures_in_const_expr Co-authored-by: Volker Dusch <volker@tideways-gmbh.com> Co-authored-by: Ilija Tovilo <ilija.tovilo@me.com> Co-authored-by: Arthur Kurbidaev <artkurbidaev@gmail.com>
show more ...
|
#
37995c09 |
| 22-Oct-2024 |
Samuel Melrose |
Add opcache.file_cache_read_only Closes GH-16551
|
#
ccda20b8 |
| 18-Nov-2024 |
David Carlier |
ext/sockets: Adding TCP_FUNCTION_BLK socket option for FreeBSD. Allows to select an alternate TCP stack. For example with RACK, a fast loss detection relying on timestamp per packet.
ext/sockets: Adding TCP_FUNCTION_BLK socket option for FreeBSD. Allows to select an alternate TCP stack. For example with RACK, a fast loss detection relying on timestamp per packet. While it works system-wide, it can also apply in an individual socket level too. close GH-16842
show more ...
|
#
6dec6a6d |
| 10-Nov-2024 |
Christoph M. Becker |
Add PHP_BUILD_DATE constant This information can be occasionally useful, and would otherwise need to be parsed from `phpinfo()` output. However, maybe more importantly we unify
Add PHP_BUILD_DATE constant This information can be occasionally useful, and would otherwise need to be parsed from `phpinfo()` output. However, maybe more importantly we unify the build date between what is given by `php -v` and `php -i`, since these compilation units are not necessarily preprocessed within the same second. Closes GH-16747.
show more ...
|
#
03cbb3ee |
| 08-Oct-2024 |
Christoph M. Becker |
Build com_dotnet shared by default The official Windows builds and CI are doing this for ages, so it appears to be overdue to finally switch the actual default. Closes GH-16300.
|
#
efe4fc9f |
| 14-Nov-2024 |
Ayesh Karunaratne |
UPGRADING: Fix `CURLOPT_TCP_KEEPCNT` entry
|
#
3815a773 |
| 03-Nov-2024 |
Christoph M. Becker |
Close GH-16659: Bump ICU requirement to ICU >= 57.1 This requirements bump should rarely affect anybody in practice. All major distros already ship more recent ICU versions, and even fo
Close GH-16659: Bump ICU requirement to ICU >= 57.1 This requirements bump should rarely affect anybody in practice. All major distros already ship more recent ICU versions, and even for Solaris 11, ICU 57.1 is available via OpenCSW. Note that ICU 57.1 has been released on 2016-03-23[1]. [1] <https://icu.unicode.org/download/57> Closes GH-16688.
show more ...
|
#
33ba1a4a |
| 09-Nov-2024 |
David Carlier |
ext/sockets: adding IPPROTO_ICMP* constants for socket creations. Is to create socket for Internet Control Message Protocol context. Due to their nature, they are meant to be used via
ext/sockets: adding IPPROTO_ICMP* constants for socket creations. Is to create socket for Internet Control Message Protocol context. Due to their nature, they are meant to be used via raw sockets rather than TCP/UDP. close GH-16737
show more ...
|
#
10f1f924 |
| 09-Nov-2024 |
DanielEScherzer |
Add `ReflectionConstant::getExtension()` and `::getExtensionName()` (#16603)
|
#
a3b27c08 |
| 09-Nov-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Add Dom\Element::insertAdjacentHTML() (#16614)
|
#
96d1cd00 |
| 02-Nov-2024 |
Niels Dossche <7771979+nielsdos@users.noreply.github.com> |
Fix GH-16665: \array and \callable should not be usable This list was initially introduced in 53a40386, but never included array or callable. I suppose this is because int & friends are
Fix GH-16665: \array and \callable should not be usable This list was initially introduced in 53a40386, but never included array or callable. I suppose this is because int & friends are not actual tokens, while array and callable are. This means it was never possible to do class array, which is probably the reason this was overlooked. Closes GH-16683.
show more ...
|
#
ca5fd055 |
| 02-Nov-2024 |
David Carlier |
ext/posix: adding POSIX_SC_OPEN_MAX constant. returns the number of file descriptors that a process can handle. e.g. useful after pcntl_fork() to close all the file descriptors up to
ext/posix: adding POSIX_SC_OPEN_MAX constant. returns the number of file descriptors that a process can handle. e.g. useful after pcntl_fork() to close all the file descriptors up to that boundary. close GH-16681
show more ...
|
#
2b10cd1b |
| 24-Oct-2024 |
Christoph M. Becker |
Deprecate mhash constants The mhash functions already have been deprecated as of PHP 8.1.0[1], but the respective constants appear to have been missed. We catch up on that.
Deprecate mhash constants The mhash functions already have been deprecated as of PHP 8.1.0[1], but the respective constants appear to have been missed. We catch up on that. [1] <https://wiki.php.net/rfc/deprecations_php_8_1#mhash_function_family> Closes GH-16569.
show more ...
|
#
f5e743a5 |
| 12-Sep-2024 |
Daniel Scherzer |
Add ReflectionConstant::getFileName() Allow determining the name of the file that defined a constant, when the constant was defined in userland code via const or define(). For constants
Add ReflectionConstant::getFileName() Allow determining the name of the file that defined a constant, when the constant was defined in userland code via const or define(). For constants defined by PHP core or extensions, false is returned, matching the existing getFileName() methods on other reflection classes. Fixes GH-15723 Closes GH-15847
show more ...
|