[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


   if modname=='test.badsyntax_pep3120':

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>

More information about the New-bugs-announce mailing list