classification
Title: _posixsubprocess module broken on x32
Type: Stage: resolved
Components: Extension Modules Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: gregory.p.smith Nosy List: Arfrever, amaury.forgeotdarc, gregory.p.smith, python-dev, vapier
Priority: normal Keywords: patch

Created on 2012-06-04 18:07 by vapier, last changed 2012-06-05 20:37 by Arfrever. This issue is now closed.

Files
File name Uploaded Description Edit
python-3.2.3-x32.patch vapier, 2012-06-04 18:07
Messages (8)
msg162281 - (view) Author: Mike Frysinger (vapier) Date: 2012-06-04 18:07
the direct call to the getdents syscall is broken on x32.  there, the first two args are not unsigned long, but unsigned long long.  patch attached to fix the issue.
msg162310 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-06-04 23:42
What is x32?
msg162312 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-06-04 23:54
Answering my own question I believe x32 is the new ABI being worked on as described in http://lwn.net/Articles/456731/.

In that light, your patch makes sense assuming the __ILP32__ define is something gcc's cpp will always be defining when targeting x32.  I will apply it.
msg162313 - (view) Author: Gregory P. Smith (gregory.p.smith) * (Python committer) Date: 2012-06-04 23:58
for reference - https://sites.google.com/site/x32abi/
msg162317 - (view) Author: Mike Frysinger (vapier) Date: 2012-06-05 01:35
$ echo | gcc -m32 -E -P -dD - | grep LP
<nothing>
$ echo | gcc -m64 -E -P -dD - | grep LP
#define _LP64 1
#define __LP64__ 1
$ echo | gcc -mx32 -E -P -dD - | grep LP
#define _ILP32 1
#define __ILP32__ 1
msg162366 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2012-06-05 19:22
Would a uint64_t be recommended in this case?
msg162369 - (view) Author: Mike Frysinger (vapier) Date: 2012-06-05 19:38
a uint64_t would fix it for x86_64, but break it most 32bit systems as sizeof(unsigned long) == 32bit for them
msg162372 - (view) Author: Roundup Robot (python-dev) Date: 2012-06-05 20:30
New changeset aa9cfeea07ad by Gregory P. Smith in branch '3.2':
Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.
http://hg.python.org/cpython/rev/aa9cfeea07ad

New changeset 5a4d5e714d08 by Gregory P. Smith in branch 'default':
Fixes issue #15000: support the odd x32 abi on posixsubprocess's system call.
http://hg.python.org/cpython/rev/5a4d5e714d08
History
Date User Action Args
2012-06-05 20:37:32Arfreversetstage: patch review -> resolved
2012-06-05 20:32:09gregory.p.smithsetstatus: open -> closed
resolution: fixed
2012-06-05 20:30:56python-devsetnosy: + python-dev
messages: + msg162372
2012-06-05 19:38:08vapiersetmessages: + msg162369
2012-06-05 19:22:56amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg162366
2012-06-05 19:09:08Arfreversetnosy: + Arfrever
title: posixsubprocess module broken on x32 -> _posixsubprocess module broken on x32

stage: patch review
versions: + Python 3.3
2012-06-05 01:35:58vapiersetmessages: + msg162317
2012-06-04 23:58:53gregory.p.smithsetmessages: + msg162313
2012-06-04 23:54:04gregory.p.smithsetassignee: gregory.p.smith
messages: + msg162312
2012-06-04 23:42:33gregory.p.smithsetmessages: + msg162310
2012-06-04 22:02:35r.david.murraysetnosy: + gregory.p.smith
2012-06-04 18:07:37vapiercreate