[Python-bugs-list] [ python-Bugs-675341 ] momory fault on exit

SourceForge.net noreply@sourceforge.net
Mon, 27 Jan 2003 02:32:43 -0800


Bugs item #675341, was opened at 2003-01-27 11:32
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=675341&group_id=5470

Category: Python Interpreter Core
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Sjoerd Mullender (sjoerd)
Assigned to: Martin v. Löwis (loewis)
Summary: momory fault on exit

Initial Comment:
Martin, I think this has to do with your changes to
iconv_codec.

After cvs update; configure; make, I get a seg fault on
exit of the interpreter after doing nothing other than
typing ctrl-D.  This is on Linux (RedHat 8.0).

+ ./python
Python 2.3a1 (#1, Jan 27 2003, 11:06:58)
[GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>>
Memory fault

However:
+ ./python -S
Python 2.3a1 (#1, Jan 27 2003, 11:06:58)
[GCC 3.2 20020903 (Red Hat Linux 8.0 3.2-7)] on linux2
Type "help", "copyright", "credits" or "license" for
more information.
>>>
+


Stack trace:

(gdb) bt
#0  0x0808606c in type_dealloc (type=0x4001d400)
    at ../Objects/typeobject.c:1998
#1  0x08073179 in dict_dealloc (mp=0x400f4a44) at
../Objects/dictobject.c:686
#2  0x08073179 in dict_dealloc (mp=0x4009a8ac) at
../Objects/dictobject.c:686
#3  0x080bcb1d in _PyImport_Fini () at
../Python/import.c:224
#4  0x080c57b4 in Py_Finalize () at
../Python/pythonrun.c:232
#5  0x08054b1d in Py_Main (argc=1, argv=0xbffff5e4) at
../Modules/main.c:457
#6  0x0805431a in main (argc=1, argv=0xbffff5e4) at
../Modules/python.c:23
#7  0x420158d4 in __libc_start_main () from
/lib/i686/libc.so.6

And the reason I think Martin has something to do with
it (note the tp_name field):
(gdb) p *type
$2 = {ob_refcnt = 0, ob_type = 0x8104b20, ob_size = 0,
  tp_name = 0x4001cbf2 "iconvcodec", tp_basicsize = 20,
tp_itemsize = 0,
  tp_dealloc = 0x4001c81e <iconvcodec_dealloc>,
tp_print = 0, tp_getattr = 0,
  tp_setattr = 0, tp_compare = 0, tp_repr = 0x4001c8ca
<iconvcodec_repr>,
  tp_as_number = 0x0, tp_as_sequence = 0x0,
tp_as_mapping = 0x0, tp_hash = 0,
  tp_call = 0, tp_str = 0, tp_getattro = 0x807786a
<PyObject_GenericGetAttr>,
  tp_setattro = 0, tp_as_buffer = 0x0, tp_flags = 17899,
  tp_doc = 0x4001d020 "iconvcodec object", tp_traverse
= 0, tp_clear = 0,
  tp_richcompare = 0, tp_weaklistoffset = 0, tp_iter =
0, tp_iternext = 0,
  tp_methods = 0x4001d3c0, tp_members = 0x0, tp_getset
= 0x0, tp_base = 0x0,
  tp_dict = 0x0, tp_descr_get = 0, tp_descr_set = 0,
tp_dictoffset = 0,
  tp_init = 0, tp_alloc = 0x80833e6 <PyType_GenericAlloc>,
  tp_new = 0x4001c5c4 <iconvcodec_new>, tp_free =
0x80ccc0e <PyObject_GC_Del>,
  tp_is_gc = 0, tp_bases = 0x0, tp_mro = 0x0, tp_cache
= 0x0,
  tp_subclasses = 0x0, tp_weaklist = 0x0, tp_del = 0}


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

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