[issue9319] segfault when searching modules with help()

2010-10-18 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: The test in the patch isn't quite right. The following still fails. Python 3.2a3+ (py3k:85719, Oct 18 2010, 22:32:47) [GCC 4.4.3] on linux2 Type help, copyright, credits or license for more information. import imp

[issue9319] segfault when searching modules with help()

2010-08-04 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: This is by far the simplest fix for this. See patch file. This patch is what Stefan Krah suggested and I agree unless someone a lot more familiar with the import process can take a look at this and re-factor things so the filename is

[issue9319] segfault when searching modules with help()

2010-08-04 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The diff which I posted was not really meant as the ultimate fix. It's a workaround. I think the real filename should be passed down to PyTokenizer_FromFile or PyTokenizer_FindEncoding. -- ___

[issue9319] segfault when searching modules with help()

2010-08-04 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: I added you to this Victor because it looks like what your doing to rewrite the imports to work with Unicode (issue:9425) overlaps this. See the test in the patch. Your rewrite may fix this as the segfault has to do with getting the

[issue9319] segfault when searching modules with help()

2010-07-29 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: The error happens when Null is passed to strlen in (unicodeobject.c, line 860) Passing NULL to a string format function is probably in the category of don't do that. Stefans solution of checking for NULL before calling PyErr_Format

[issue9319] segfault when searching modules with help()

2010-07-24 Thread Ron Adam
Ron Adam ron_a...@users.sourceforge.net added the comment: Trying to look at this a bit further... The PyErr_Format function then calls PyUnicode_FromFormatV in Objects/unicodeobject.c to do the actual formating. It looks like there have been a number of issues of this type. Search the

[issue9319] segfault when searching modules with help()

2010-07-21 Thread Ron Adam
New submission from Ron Adam ron_a...@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 ==

[issue9319] segfault when searching modules with help()

2010-07-21 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Looks like tok-filename isn't set in PyTokenizer_FromFile: Index: Parser/tokenizer.c === --- Parser/tokenizer.c (revision 82984) +++ Parser/tokenizer.c (working copy) @@

[issue9319] segfault when searching modules with help()

2010-07-21 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9319 ___ ___

[issue9319] segfault when searching modules with help()

2010-07-21 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: To be a little clearer: Since tok-filename is used as a flag in other places, I'm not sure where to set it without breaking other things. This is the location of the segfault and the following would fix it (using a placeholder for the