When investigating another bug reported by GitHub user 'tstangner',
I discovered that PHP segfaults when the INI parameter
zend.script_encoding is set to "pass". This bug dates back to
December 2022 (caused by yours truly in 953864661a).
If any PHP users in the wild were actually setting zend.script_encoding
to "pass" (which would be an utterly useless thing to do), I expect that
someone would have filed a bug report by now. The absence of such bug
reports is evidence that nobody is doing this.
Hence, it seems that the best fix is simply to disallow "pass" as a
choice for zend.script_encoding. The internal function
'php_mb_zend_encoding_list_parser' which I am modifying to accomplish
this has no other in-tree callers, aside from the 'exif' extension.
Further, exif only calls the function with a few hard-coded values, and
none of them are the string "pass", so this change will not have any
impact on exif.
On *nix installation there is zend_dfg.h installed as part of the bug
fix#81136, but it wasn't synced with Windows yet. This now syncs Zend
headers on both builds.
According to the docs, UNUM_ROUND_HALF_ODD is only available since ICU 69.0. The build on Travis currently fails probably because it uses a lower version.
* PHP-8.3:
Fix GH-13177: PHP 8.3.2: final private constructor not allowed when used in trait
Fix GH-12107: When running a stored procedure (that returns a result set) twice, PHP crashes
zend_compile has an exception to this rule for constructors using
`zend_is_constructor`, which compares the function name to
`__construct`. Sadly, `zend_is_constructor` is not a public API, but we
can just do the string compare ourselves.
Closes GH-13179.
It needs to be "object".
This is because first- and third-party extension can register custom
node types using `php_libxml_register_export`. So we don't know upfront
what types can be expected.
This also changes the error to a TypeError everywhere.
The NumberFormatter::ROUND_HALFEVEN constant exists in PHP already, but its counterpart ROUND_HALFODD was missing.
This adds it, using `UNUM_ROUND_HALF_ODD`
Close GH-13191
On Windows internal_functions.c file is created from the same template
internal_functions.c.in as in Autotools build system. This was once used
with Microsoft Developer Studio files (1995).
The implementation of `php_random_uint128_*` exists specifically for
pcgoneseq128xslrr66 and takes up a third of php_random.h. Split it into its own
header to keep php_random.h focused on the functionality directly related to
randomness.
* Arrays returned from range are never empty
* When step is a double value representable by a long, it is coerced implicitly.
As such, passing a double step no longer guarantees that the result is a
non-int array.
Closes GH-13166
* missing SKIP_ONLINE_TESTS
gethostbynamel may contact DNS servers, so it should be skipped if SKIP_ONLINE_TESTS , and on a AMD Ryzen 9 7950x WSL Ubuntu this test took ~2 seconds (some DNS timeout i guess?) so it should also have SKIP_SLOW_TESTS
* error message nitpick
* missing SKIP_SLOW_TESTS
this test took 2 seconds to execute on a 5GHz AMD Ryzen 9 7950x (one of AMD's fastest single-thread-performance CPUs), it should have SKIP_SLOW_TESTS
* skip message nitpick
Commit 5cbe5a538c disabled chunking for all writes to streams. However,
user streams have a callback where code is executed on data that is
subject to the memory limit. Therefore, when using large writes or
stream_copy_to_stream/copy the memory limit can easily be hit with large
enough data.
To solve this, we reintroduce chunking for userspace streams.
Users have control over the chunk size, which is neat because
they can improve the performance by setting the chunk size if
that turns out to be a bottleneck.
In an ideal world, we add an option so we can "ask" the stream whether
it "prefers" chunked writes, similar to how we have
php_stream_mmap_supported & friends. However, that cannot be done on
stable branches.
Closes GH-13136.
Recentlty this insructions were updated to emit warning on inability to
convert double index to long. This may lead to exception.
This fixes memory leak on wordpress test suite (nightly workflow)