Skip to content

More checking for null fd#7131

Merged
headius merged 1 commit intojruby:jruby-9.3from
headius:check_null_fd
Mar 10, 2022
Merged

More checking for null fd#7131
headius merged 1 commit intojruby:jruby-9.3from
headius:check_null_fd

Conversation

@headius
Copy link
Member

@headius headius commented Mar 10, 2022

This may resolve issues like #6669 where an in-use stream is
closed in another thread. We have some races here (which may be
unavoidable) that can lead to the fd field getting nulled out on
the way to a read or write. Without null checks, we may raise NPE
instead of a more appropriate EBADF when the fd is dereferenced.

This may resolve issues like jruby#6669 where an in-use stream is
closed in another thread. We have some races here (which may be
unavoidable) that can lead to the fd field getting nulled out on
the way to a read or write. Without null checks, we may raise NPE
instead of a more appropriate EBADF when the fd is dereferenced.
@headius headius added this to the JRuby 9.3.4.0 milestone Mar 10, 2022
@headius headius merged commit 0c9f9ab into jruby:jruby-9.3 Mar 10, 2022
@headius headius deleted the check_null_fd branch March 10, 2022 20:10
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.

1 participant