Coredump: python 1.5.2

Toby J Sargeant tjs at longford.cs.monash.edu.au
Thu Jul 8 00:26:14 EDT 1999


The following code causes a coredump under python 1.5.2

class Stuffed:
   def __getattr__(self,key):
      print self

print Stuffed()

[toby at ephedra]$ python 
Python 1.5.2 (#3, Jun 17 1999, 22:05:33)  [GCC egcs-2.91.66 19990314/Linux (egcs- on linux2
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> 

(Part of the) Backtrace:

#0  0x4009fc16 in chunk_alloc (ar_ptr=0xbfe02050, nb=18031028) at malloc.c:2637
#1  0x4009fb8a in __libc_malloc (bytes=20) at malloc.c:2616
#2  0x8073800 in PyTuple_New (size=2) at tupleobject.c:85
#3  0x805de9b in do_mktuple (p_format=0xbfe020c4, p_va=0xbfe020c8, endchar=41, 
    n=2) at modsupport.c:246
#4  0x805df75 in do_mkvalue (p_format=0xbfe020c4, p_va=0xbfe020c8)
    at modsupport.c:275
#5  0x805e15d in Py_VaBuildValue (format=0x808a51e "(OO)", va=0xbfe020e8)
    at modsupport.c:426
#6  0x805e0fb in Py_BuildValue (format=0x808a51e "(OO)") at modsupport.c:399
#7  0x80662d6 in instance_getattr (inst=0x80be9b0, name=0x80a5b78)
    at classobject.c:632
#8  0x8071a31 in PyObject_GetAttrString (v=0x80be9b0, name=0x808baf9 "__str__")
    at object.c:368
#9  0x8071784 in PyObject_Str (v=0x80be9b0) at object.c:255
#10 0x807163f in PyObject_Print (op=0x80be9b0, fp=0x401301a0, flags=1)
    at object.c:186
#11 0x8069d28 in PyFile_WriteObject (v=0x80be9b0, f=0x80a11f8, flags=1)
    at fileobject.c:1044
#12 0x80521a4 in eval_code2 (co=0x80be888, globals=0x80a69c8, locals=0x0, 
    args=0x82771cc, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
    owner=0x0) at ceval.c:1054
#13 0x805421b in call_function (func=0x80be9f0, arg=0x82771c0, kw=0x0)
    at ceval.c:2484
#14 0x8053e3a in PyEval_CallObjectWithKeywords (func=0x80be9f0, arg=0x82771c0, 
    kw=0x0) at ceval.c:2322
#15 0x80662ec in instance_getattr (inst=0x80be9b0, name=0x80a5b78)
    at classobject.c:635
#16 0x8071a31 in PyObject_GetAttrString (v=0x80be9b0, name=0x808baf9 "__str__")
    at object.c:368
#17 0x8071784 in PyObject_Str (v=0x80be9b0) at object.c:255
#18 0x807163f in PyObject_Print (op=0x80be9b0, fp=0x401301a0, flags=1)
    at object.c:186
#19 0x8069d28 in PyFile_WriteObject (v=0x80be9b0, f=0x80a11f8, flags=1)
    at fileobject.c:1044
#20 0x80521a4 in eval_code2 (co=0x80be888, globals=0x80a69c8, locals=0x0, 
    args=0x8277064, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, 
    owner=0x0) at ceval.c:1054
#21 0x805421b in call_function (func=0x80be9f0, arg=0x8277058, kw=0x0)
    at ceval.c:2484
#22 0x8053e3a in PyEval_CallObjectWithKeywords (func=0x80be9f0, arg=0x8277058, 
    kw=0x0) at ceval.c:2322
#23 0x80662ec in instance_getattr (inst=0x80be9b0, name=0x80a5b78)
    at classobject.c:635
#24 0x8071a31 in PyObject_GetAttrString (v=0x80be9b0, name=0x808baf9 "__str__")
    at object.c:368

Toby.




More information about the Python-list mailing list