This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: subprocess module truncates handles on AMD64
Type: behavior Stage:
Components: Extension Modules, Windows Versions: Python 3.0, Python 2.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: gregory.p.smith, rupole
Priority: high Keywords: 64bit, easy, patch

Created on 2008-06-16 04:35 by rupole, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
windows-amd64-subprocess-handle-gps02.diff gregory.p.smith, 2008-07-20 00:16 cast HANDLE to in equivalent sized type
Messages (5)
msg68263 - (view) Author: Roger Upole (rupole) Date: 2008-06-16 04:35
HANDLEs are pointer sized values, but there are several places in
_subprocess.c where it assumes they are the same size as longs
which are still 4 bytes on win64.
msg70055 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-19 20:51
i believe this patch will fix it.  but i don't have a windows build
environment setup yet to even try it.

Exposing pointers to data structures as a number to Python is very gross
to begin with.  It'd be safer to define a tiny type to wrap them in.

Review at:  http://codereview.appspot.com/2608
msg70062 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-07-20 00:23
fixed in trunk r65151 (in theory).

I don't have amd64 to test with.

Roger, would you please test an AMD64 build from that revision or later
to confirm that it is fixed?

Once confirmed, this should be backported to release25-maint.
msg70067 - (view) Author: Roger Upole (rupole) Date: 2008-07-20 08:41
This fixes the problem I had on 64-bit Vista, and all of python's own 
tests still pass.
msg70672 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2008-08-04 00:21
fixed in release25-maint r65461.  already merged into py3k from trunk.
History
Date User Action Args
2022-04-11 14:56:35adminsetgithub: 47370
2008-08-04 00:21:50gregory.p.smithsetstatus: open -> closed
resolution: fixed
messages: + msg70672
2008-07-20 18:03:34gregory.p.smithsetversions: - Python 2.6
2008-07-20 08:41:47rupolesetmessages: + msg70067
2008-07-20 00:23:59gregory.p.smithsetkeywords: + 64bit, easy
messages: + msg70062
2008-07-20 00:16:23gregory.p.smithsetfiles: - windows-amd64-subprocess-handle-gps01.diff
2008-07-20 00:16:18gregory.p.smithsetfiles: + windows-amd64-subprocess-handle-gps02.diff
2008-07-19 20:51:32gregory.p.smithsetfiles: + windows-amd64-subprocess-handle-gps01.diff
keywords: + patch
messages: + msg70055
2008-07-07 05:04:35gregory.p.smithsetpriority: high
assignee: gregory.p.smith
type: behavior
components: + Extension Modules
nosy: + gregory.p.smith
2008-06-16 04:35:58rupolecreate