[Patches] [ python-Patches-514641 ] Negative ob_size of LongObjects
noreply@sourceforge.net
noreply@sourceforge.net
Fri, 01 Mar 2002 06:40:36 -0800
Patches item #514641, was opened at 2002-02-07 22:26
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=514641&group_id=5470
Category: Core (C code)
>Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Naofumi Honda (naofumi-h)
Assigned to: Nobody/Anonymous (nobody)
Summary: Negative ob_size of LongObjects
Initial Comment:
I found the following bugs due to the negative ob_size
of LongObjects representing the negative values.
1) The access of attribute "__dict__" causes
panic.
class A(long):
pass
x = A(-1)
x.__dict__
==> core dump!
2) pickle neglects the sign of LongObjects
import pickle
class A(long):
pass
x = A(-1)
pickle.dumps(x)
==> a string containing 1L (not -1L) !!!
The patch will resolve the above problems.
Naofumi Honda
----------------------------------------------------------------------
Comment By: Neal Norwitz (nnorwitz)
Date: 2002-02-08 08:21
Message:
Logged In: YES
user_id=33168
There is a bug report for this item: #506679.
https://sourceforge.net/tracker/index.php?func=detail&aid=506679&group_id=5470&atid=105470
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=514641&group_id=5470