Skip to content
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

Added check_open(sock) to _sockname to prevent segfault and throw error instead #41000

Merged
merged 4 commits into from
May 31, 2021

Conversation

cljord
Copy link
Contributor

@cljord cljord commented May 29, 2021

_sockname is used in getpeername in the Sockets module. Trying to use this with a closed socket would cause a segfault. The function now has check_open(sock) to check whether the socket is already closed and throw an error instead. Referenced in #40993

Co-authored-by: Jameson Nash <vtjnash@gmail.com>
@vtjnash vtjnash merged commit 28e30a3 into JuliaLang:master May 31, 2021
@cljord cljord deleted the cj/bug-socket-check-open branch June 1, 2021 05:11
shirodkara pushed a commit to shirodkara/julia that referenced this pull request Jun 9, 2021
Not checking could lead to a segfault on closed TCPSockets in getpeername

Fixes JuliaLang#40993
johanmon pushed a commit to johanmon/julia that referenced this pull request Jul 5, 2021
Not checking could lead to a segfault on closed TCPSockets in getpeername

Fixes JuliaLang#40993
@fredrikekre fredrikekre added the backport 1.6 Change should be backported to release-1.6 label Dec 8, 2021
@ghost ghost mentioned this pull request Dec 8, 2021
KristofferC pushed a commit that referenced this pull request Jan 10, 2022
Not checking could lead to a segfault on closed TCPSockets in getpeername

Fixes #40993

(cherry picked from commit 28e30a3)
@KristofferC KristofferC mentioned this pull request Jan 10, 2022
50 tasks
@KristofferC KristofferC removed the backport 1.6 Change should be backported to release-1.6 label May 16, 2022
staticfloat pushed a commit that referenced this pull request Dec 23, 2022
Not checking could lead to a segfault on closed TCPSockets in getpeername

Fixes #40993

(cherry picked from commit 28e30a3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants