fix(libc): preserve stream state after a failed negative seek #5282
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5282"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-10-13T16:26:37Z.
What
Fixes #5251. Reject negative
SEEK_SETtargets andSEEK_CURtargets before changing the stream position, EOF indicator, or pushback state. The pipe regression also verifies a negative absolute seek returnsEINVALwithout consuming the next byte. Records the remainingSEEK_ENDhost-state behavior in the libc debt list.The upstream implementation commit retains Hussein Kadhim as its author. Separate regression and test-placement commits are authored by MarcZX100.
Tested
guest_standard_streamsandfile_streamspassed (2/2), including negative seeks after EOF, with pushback data, and on a pipe.git diff --checkpassed.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by LeandroLP23 on 2026-10-13T22:58:20Z.
Windows check: Windows 11 (26300), WinLibs GCC 15.2.0, Release, head
60d6a8e16merged ontomain30f961266.guest_standard_streamspasses.main'slibc/src/FileAndHeap.cppand the PR's test: it fails. The test'sRequireaborts (exit0xc0000409), so the extended failed-seek checks catch the current behaviour on Windows.AI-assisted: yes (Claude Code)
Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T02:29:52Z.
Closing: no title is known to reach this. With the queue at 700+ open PRs, please hold off on new PRs that don't name a title needing the change until it's down. If a title stops on this on current main, reopen with the title ID and the log line.
Pull request closed