[Python-bugs-list] [ python-Bugs-506679 ] Core dump subclassing long

noreply@sourceforge.net noreply@sourceforge.net
Mon, 21 Jan 2002 14:41:54 -0800


Bugs item #506679, was opened at 2002-01-21 14:36
You can respond by visiting: 
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=506679&group_id=5470

Category: Type/class unification
Group: Python 2.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Nicholas Socci (nsocci)
Assigned to: Nobody/Anonymous (nobody)
Summary: Core dump subclassing long

Initial Comment:
The following code dumps core:

class C(long):
    pass

c=C(-1)


Note if running interactly the core dump occurs when 
you quit the interpreter. No problem for positive 
numbers of if subclassing int or float.

Version information:

Python 2.2 (#1, Dec 28 2001, 14:02:28)
[GCC 2.96 20000731 (Red Hat Linux 7.1 2.96-85)] on 
linux2



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

>Comment By: Neal Norwitz (nnorwitz)
Date: 2002-01-21 14:41

Message:
Logged In: YES 
user_id=33168

Here's a stack trace.

#0  subtype_dealloc (self=0x818598c) at Objects/typeobject.c:349
#1  0x080c33cc in PyDict_SetItem (op=0x810b8fc,
key=0x812a388, value=0x80ddc3c)
    at Objects/dictobject.c:373
#2  0x080c6189 in _PyModule_Clear (m=0x810b734) at
Objects/moduleobject.c:124
#3  0x0808a5d1 in PyImport_Cleanup () at Python/import.c:284
#4  0x08092f1e in Py_Finalize () at Python/pythonrun.c:231
#5  0x080534a6 in Py_Main (argc=1, argv=0xbffff914) at
Modules/main.c:376
#6  0x40087507 in __libc_start_main (main=0x8052d70 <main>,
argc=1, 
    ubp_av=0xbffff914, init=0x8052194 <_init>,
fini=0x80ca4c0 <_fini>, 
    rtld_fini=0x4000dc14 <_dl_fini>, stack_end=0xbffff90c)
    at ../sysdeps/generic/libc-start.c:129


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

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