Issue 3120: subprocess module truncates handles on AMD64 (original) (raw)

This issue has been migrated to GitHub: https://github.com/python/cpython/issues/47370

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:35 admin set github: 47370
2008-08-04 00:21:50 gregory.p.smith set status: open -> closedresolution: fixedmessages: +
2008-07-20 18:03:34 gregory.p.smith set versions: - Python 2.6
2008-07-20 08:41:47 rupole set messages: +
2008-07-20 00:23:59 gregory.p.smith set keywords: + 64bit, easymessages: +
2008-07-20 00:16:23 gregory.p.smith set files: - windows-amd64-subprocess-handle-gps01.diff
2008-07-20 00:16:18 gregory.p.smith set files: + windows-amd64-subprocess-handle-gps02.diff
2008-07-19 20:51:32 gregory.p.smith set files: + windows-amd64-subprocess-handle-gps01.diffkeywords: + patchmessages: +
2008-07-07 05:04:35 gregory.p.smith set priority: highassignee: gregory.p.smithtype: behaviorcomponents: + Extension Modulesnosy: + gregory.p.smith
2008-06-16 04:35:58 rupole create