Files
ppsspp/ext
Henrik Rydgård 60919a2ba9 naett: Fix the curl worker's pipe read, queueing and handle cleanup
The worker reads a queued CURL* out of a pipe eight bytes at a time, tracking
how much it has so far - but it always read into the start of the buffer rather
than at that offset. A short read would have resumed mid-pointer and eventually
handed curl_multi_add_handle a spliced pointer. It never bit because a write
that size to a pipe is atomic, so reads are all-or-nothing, but the code is
written as though it isn't.

The write that queues the request was unchecked. If it ever failed, the request
was never run and never completed, and the caller sits in naettComplete
forever. It reports the failure now, and retries on EINTR.

curl wants an easy handle out of its multi before cleanup; that needs
curl_multi_remove_handle, which meant adding it - and curl_multi_cleanup, for
the init failure paths that leaked the multi handle and the pipe - to the dlopen
table.

workerRunning is written by the worker and read by the request path, so it's an
atomic rather than a plain int. And the read/write callbacks passed the body
callbacks' int return straight back to curl, which takes a size_t: a negative
came through as an enormous count rather than the error it was.
2026-09-05 12:02:22 -06:00
..
2026-07-26 14:43:00 +02:00
2026-08-11 22:36:47 +02:00
…
…
2025-06-10 15:05:18 +02:00
…
2025-09-19 10:31:51 -06:00
2026-07-01 22:39:53 +02:00
…
2025-10-15 15:06:11 -04:00
2025-10-17 12:57:51 +02:00
2025-08-24 14:47:05 +02:00
2025-08-24 14:47:05 +02:00
2026-06-16 11:49:40 +02:00
2025-08-24 14:47:05 +02:00
…
…