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.
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
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.