Skip to content

[pull] master from php:master - #1159

Merged
pull[bot] merged 2 commits into
turkdevops:masterfrom
php:master
Aug 6, 2026
Merged

[pull] master from php:master#1159
pull[bot] merged 2 commits into
turkdevops:masterfrom
php:master

Conversation

@pull

@pull pull Bot commented Aug 6, 2026

Copy link
Copy Markdown

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

TimWolla and others added 2 commits August 5, 2026 22:20
* run-tests: Add `strace` sub command for generated test reproduction scripts

Co-authored-by: Tim Düsterhus <tim@tideways-gmbh.com>

* run-tests: Pass all provided arguments to `valgrind`

* run-tests: Pass all provided arguments to `gdb`

* run-tests: Pass all provided arguments to `lldb`

* run-tests: `exec` into test reproduction helpers

This avoids needlessly carrying around the shell and provides more direct
access to the running executable.

---------

Co-authored-by: Derick Rethans <github@derickrethans.nl>
Raise a value error when the callback registered with
CURLOPT_READFUNCTION returns an unexpected long.

The function registered with CURLOPT_READFUNCTION should return a
string. PHP then writes that string to a buffer and returns the
length, so that curl can read that many bytes from the buffer.

The function can also return CURL_READFUNC_ABORT and
CURL_READFUNC_PAUSE, so it also supports returning longs. However, when
it returns a long other than these two constants, it is interpreted as a
length. PHP does not update the buffer, but does instruct curl it can
read that many bytes from the buffer. It reads whatever uninitialized
data that is in the buffer and sends it over the line to the server.

This seems bad, so validate the return value of the read function and
raise an error.

Returning 0 is a bit of an edge case. It is not documented but does
results in correct behavior (i.e. end-of-file). So we accept that, but
don't advertise it as valid in the error message.

Related to #10270

Close GH-22757
@pull pull Bot locked and limited conversation to collaborators Aug 6, 2026
@pull pull Bot added the ⤵️ pull label Aug 6, 2026
@pull
pull Bot merged commit ac37a97 into turkdevops:master Aug 6, 2026
0 of 2 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants