[New-bugs-announce] [issue9319] segfault when searching modules with help()

Ron Adam report at bugs.python.org
Wed Jul 21 08:29:25 CEST 2010


New submission from Ron Adam <ron_adam at users.sourceforge.net>:

help('modules spam') causes segfault.

When pydoc tries goes though the files it does the following in the ModuleScanner class.

(minimal example)

>>> for importer, modname, ispkg in pkgutil.walk_packages():
...     if modname == 'test.badsyntax_pep3120':
...         loader = importer.find_module(modname)
... 
Segmentation fault

Adding:

   if modname=='test.badsyntax_pep3120':
      continue

At the top of the for loop will suppress the segfault in pydoc by skipping that file.


A bit further probing narrowed it down to this...

>>> loader = pkgutil.get_loader('test.badsyntax_pep3120')
Segmentation fault

I'm not familiar with the pkgutil module so I didn't go further.

----------
components: Library (Lib)
messages: 111009
nosy: ron_adam
priority: normal
severity: normal
status: open
title: segfault when searching modules with help()
type: crash
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9319>
_______________________________________


More information about the New-bugs-announce mailing list