When step_callback fails, agg_context->val is passed dtor, but agg_context->val
is also used in final_callback regardless of the success/failure of step_callback,
so should not call dtor.
closes#14004fixes#13998
* PHP-8.2:
[ci skip] NEWS
fix: zend-max-execution-timers with negative or high timeout value (#13942)
Use return value of getpwuid_r(), not errno (#13969)
This test performs a few checks to ensure that "not too much" memory
is used while fileinfo is detecting encodings. It is however platform
specific, and memory usage varies across hosts and as libmagic changes.
Recently a Gentoo user reported a failure in this test at,
https://bugs.gentoo.org/927461
on a big-endian PPC64 machine with output,
---- EXPECTED OUTPUT
131072 => ok
262144 => ok
524288 => ok
1048576 => ok
2097152 => ok
4194304 => ok
8388608 => ok
16777216 => ok
---- ACTUAL OUTPUT
131072 => 10092544
262144 => 10092544
524288 => 12189696
1048576 => 12189696
2097152 => 14352384
4194304 => 18612224
8388608 => 24903680
16777216 => 37486592
---- FAILED
Those numbers are with 8.3.4 and therefore missing commit b7c5813c
which also raises the limits. Checking the "actual" numbers above
against the current values, we see that the limit for 524288 would
need to be bumped to 12189696 to allow this test to pass. Since that
seems reasonable, that's what this commit does.
Closes GH-13795
Closes GH-13940
- It's not necessarily an error of sysconf(_SC_GETPW_R_SIZE_MAX) returns -1, as
specified by posix (and the musl implementation always returns -1). Pick an
initial buffer size in this case.
- Reentrant variants return an error number an may not set errno
- Implement retry logic for ttyname_r()
- Fix retry logic for getpwnam_r() (pw would be NULL after the first try)
- Test retry logic by setting the initial buffer size to 1 in debug builds
php_socket_errno() may return a stale value when recv returns a
value >= 0. As such, the liveness check is wrong.
This is the same bug as #70198 (fixed in GH-1456). So we fix it in the
same way.
Closes GH-13895.
Short-lived regression from 5ce9687cb2.
I forgot to add the persistent local flag, so that means that RC_DEBUG
will complain. These strings are local to the thread so we can just add
the flag to silence the debug checker in this case.
The hash tables used are allocated via the persistent allocator.
When using ini_set, the allocation happens via the non-persistent
allocator. When the table is then freed in GSHUTDOWN, we get a crash
because the allocators are mismatched.
As a side note, it is strange that this is designed this way, because it
means that ini_sets persist between requests...
Co-authored-by: Kamil Tekiela <tekiela246@gmail.com>