[Python-bugs-list] [ python-Bugs-603937 ] Exception during _PyString_Resize

noreply@sourceforge.net noreply@sourceforge.net
Tue, 03 Sep 2002 04:28:51 -0700


Bugs item #603937, was opened at 2002-09-03 06:28
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=603937&group_id=5470

Category: Python Interpreter Core
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Skip Montanaro (montanaro)
Assigned to: Walter Dörwald (doerwalter)
Summary: Exception during _PyString_Resize

Initial Comment:
I *think* this is related to the newly mortal  string interning (or maybe 
to the recent changes Walter Dörwald checked in.  I'll start with 
Walter. ;-)

The attached little zipfile contains a trivial module (serverdir.py) and 
an ASCII pickle (foo.dat) which has not changed for a couple years.  
Today, I noticed that Python began barfing during startup (this 
particular pickle gets read in as a side effect of my rather heavyweight 
interactive initialization stuff).  In a python -S session, if I execute:

  import pickle
  o = pickle.Unpickler(open("foo.dat")).load()

I get the following traceback:

  Traceback (most recent call last):
    File "<stdin>", line 1, in ?
    File "/usr/local/lib/python2.3/pickle.py", line 674, in load
      dispatch[key](self)
    File "/usr/local/lib/python2.3/pickle.py", line 753, in load_string
      self.append(rep.decode("string-escape"))
  SystemError: ../Objects/stringobject.c:3268: bad argument to 
internal function

Line 3268 in stringobject.c is in _PyString_Resize.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=603937&group_id=5470