Repository navigation
fix(libc): fail fseek and ftell on a pipe with ESPIPE on Windows - #4839
Closed
nicolasfalesy wants to merge 1 commit into
Closed
nicolasfalesy wants to merge 1 commit into
nicolasfalesy wants to merge 1 commit into
Conversation
Contributor
10 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Contributor
|
I found the same descriptor-replacement edge case here as in #4838: |
10 tasks done
Contributor
Author
|
Closing as a duplicate of #4838, which carries the same commit, was opened first and has the fuller Linux run. Thanks @milescoviello. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Carries
DavidSamir:fix/libc-seek-pipe-stream-windows(76cca64) from #4837, which David can't open while #4532 is open. The commit is cherry-picked onto currentmainunchanged, authorship kept.Closes #4837.
On Windows,
fseekoandftello(and through themfseek,ftell,fgetpos,fsetposandrewind) now fail withESPIPEon a stream over a pipe before the C runtime is called, as on FreeBSD and the Linux build, so the stream's read buffer is no longer discarded. Whether the stream is a pipe is asked once withGetFileTypeand kept in theFileStream, and asked again afterfreopen. Linux is unchanged.guest_standard_streams' pipe check now runs on Windows too and is extended to every seek origin andftello. Details and the Windows measurements are in #4837.Tested
main90c6839 with this commit:guest_standard_streamsandfile_streamspass 5/5 (--repeat until-fail:5);tools/check_conventions.py --base upstream/mainpasses.guest_standard_streamsfails onmainand passes 5/5 with the fix; fullctest1001/1001).Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)FileAndHeap.cpp; whichever lands second needs a small rebase, which I'll do here if this one is second)