classification
Title: Calling CloseHandle twice (Modules/posixmodule.c)
Type: Stage: commit review
Components: None Versions: Python 3.2
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: georg.brandl, loewis, ocean-city
Priority: Keywords: needs review, patch

Created on 2010-12-06 04:08 by ocean-city, last changed 2010-12-07 10:27 by ocean-city. 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
2010-12-07 10:27:48ocean-citysetstatus: open -> closed
priority: release blocker ->
resolution: fixed
messages: + msg123539
2010-12-06 07:43:33ocean-citysetmessages: - msg123461
2010-12-06 07:42:42ocean-citysetmessages: + msg123461
2010-12-06 07:40:34georg.brandlsetmessages: + msg123460
2010-12-06 07:35:42loewissetmessages: + msg123458
2010-12-06 07:34:22loewissetmessages: + msg123457
2010-12-06 07:29:26georg.brandlsetmessages: + msg123456
2010-12-06 07:18:21loewissetnosy: + loewis
title: Calling CloseHandle twice (Modules/posixmodule.c) -> Calling CloseHandle twice (Modules/posixmodule.c)
messages: + msg123455
2010-12-06 04:08:55ocean-citycreate