New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SR-12079] libdispatch SEGFAULT when using Foundation's FileHandle readabilityHandler on lots of pipes #3276
Labels
Comments
CC phabouzit (JIRA User)/@millenomi/@spevans |
@swift-ci create |
leads to which is interesting.
|
@swift-ci create |
1 similar comment
@swift-ci create |
still happening on
|
Still not fixed in either 5.6 or
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Attachment: Download
Additional Detail from JIRA
md5: 507eb4e7b2c1f88b3f62677d14f5efd3
Issue Description:
The following program always opens 1000
Pipe
s (sequentially), then sets up areadabilityHandler
for each of the pipes, then closes the other end of the pipe, and waits for the readabilityHandlers to send an emptyData
meaning EOF.This works for a while until we get a SEGFAULT in dispatch here
Please note that the fault address is
0xffff800013ff70b7
and given that the pointer value ends in7
and we're looking at a 32 bit load, this looks like a nice memory corruption to because that's an unaligned 32 bit load which is unlikely to be how the code is meant to work.Credit to rignatus (JIRA User) for finding the initial issue that led to us debugging this together.
Repro:
On Linux
With lldb in Docker (runnable from macOS)
program reproduced here
The text was updated successfully, but these errors were encountered: