Issue 10637: Calling CloseHandle twice (Modules/posixmodule.c) (original) (raw)

Created on 2010-12-06 04:08 by ocean-city, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
posixmodule.diff ocean-city,2010-12-06 04:08
Messages (7)
msg123452 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-12-06 04:08
Very sorry, I created the bug calling CloseHandle twice in Modules/posixmodule.c. I think this should be fixed before beta1 released. Can I commit it?
msg123455 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-12-06 07:18
> Very sorry, I created the bug calling CloseHandle twice > in Modules/posixmodule.c. I think this should be fixed > before beta1 released. Can I commit it? Even if you commit it now, it won't get into beta1: the Windows binaries for that are already built.
msg123456 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-06 07:29
What is the result of calling it twice?
msg123457 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-12-06 07:34
The second CloseHandle call will fail. As we are not checking the CloseHandle result, this has no further consequences, AFAICT.
msg123458 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2010-12-06 07:35
quick followup: there is a chance that this closes the wrong file due to race conditions, in case a different thread opens a file in-between that gets the same handle. Due to the GIL, this is unlikely
msg123460 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2010-12-06 07:40
OK, I would say this is an acceptable bug in a beta release. Will fix it after the release is done.
msg123539 - (view) Author: Hirokazu Yamamoto (ocean-city) * (Python committer) Date: 2010-12-07 10:27
Committed in r87117(py3k).
History
Date User Action Args
2022-04-11 14:57:09 admin set github: 54846
2010-12-07 10:27:48 ocean-city set status: open -> closedpriority: release blocker -> resolution: fixedmessages: +
2010-12-06 07:43:33 ocean-city set messages: -
2010-12-06 07:42:42 ocean-city set messages: +
2010-12-06 07:40:34 georg.brandl set messages: +
2010-12-06 07:35:42 loewis set messages: +
2010-12-06 07:34:22 loewis set messages: +
2010-12-06 07:29:26 georg.brandl set messages: +
2010-12-06 07🔞21 loewis set nosy: + loewistitle: Calling CloseHandle twice (Modules/posixmodule.c) -> Calling CloseHandle twice (Modules/posixmodule.c)messages: +
2010-12-06 04:08:55 ocean-city create