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

_writer: fix unsafe finally clause (bug 728580) #560

Merged
merged 1 commit into from Jun 18, 2020

Conversation

zmedico
Copy link
Member

@zmedico zmedico commented Jun 18, 2020

In the coroutine finally clause, do not call remove_writer in cases
where fd has been closed and then re-allocated to a concurrent
coroutine as in bug 716636.

Also, assume that the caller will put the file in non-blocking mode
and close the file when done, so that this function is suitable for
use within a loop.

Bug: https://bugs.gentoo.org/728580
Signed-off-by: Zac Medico zmedico@gentoo.org

@zmedico zmedico force-pushed the bug_728580_unsafe_remove_writer branch from f86123f to 380fc12 Compare June 18, 2020 07:23
In the coroutine finally clause, do not call remove_writer in cases
where fd has been closed and then re-allocated to a concurrent
coroutine as in bug 716636.

Also, assume that the caller will put the file in non-blocking mode
and close the file when done, so that this function is suitable for
use within a loop.

Bug: https://bugs.gentoo.org/728580
Reviewed-by: Brian Dolbec <dolsen@gentoo.org>
Signed-off-by: Zac Medico <zmedico@gentoo.org>
@zmedico zmedico force-pushed the bug_728580_unsafe_remove_writer branch from 380fc12 to 92be5a0 Compare June 18, 2020 17:54
@gentoo-bot gentoo-bot merged commit 92be5a0 into gentoo:master Jun 18, 2020
@zmedico zmedico deleted the bug_728580_unsafe_remove_writer branch June 18, 2020 18:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants