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: id() for large ptr should return a long
Type: Stage:
Components: Interpreter Core Versions: Python 2.4
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: anthonybaxter, georg.brandl, georg.brandl, loewis
Priority: normal Keywords:

Created on 2003-11-06 15:11 by anthonybaxter, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
ptr2.diff loewis, 2006-04-10 12:27
Messages (9)
msg18923 - (view) Author: Anthony Baxter (anthonybaxter) (Python triager) Date: 2003-11-06 15:11
Under something like Redhat 10 the address space is
messed about with to "prevent stack smash attacks" or
some such. This means that you sometimes get addresses
in the high half of a 32 bit int. Since Python ints are
signed, this means we return a negative number from
id(). For 2.4, we should probably return a long. 
msg18924 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2003-11-06 20:54
Logged In: YES 
user_id=21627

Would there anything be wrong with making that change right
away?
msg18925 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-01-10 22:21
Logged In: YES 
user_id=1188172

Perhaps, for 2.5?
msg18926 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-01-11 22:39
Logged In: YES 
user_id=21627

How about the attached patch?
msg18927 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-01-13 17:24
Logged In: YES 
user_id=1188172

You're making changes to PyLong_FromVoidPtr, doesn't
PyLong_AsVoidPtr have to be changed too?
msg18928 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-02-20 21:52
Logged In: YES 
user_id=849994

Ping!
msg18929 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-10 12:27
Logged In: YES 
user_id=21627

Right: about about this patch?
msg18930 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2006-04-10 12:52
Logged In: YES 
user_id=849994

Looks fine from my POV.
msg18931 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-04-10 20:28
Logged In: YES 
user_id=21627

Committed as r45239.
History
Date User Action Args
2022-04-11 14:56:01adminsetgithub: 39516
2003-11-06 15:11:47anthonybaxtercreate