[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-08-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Seems fixed now. -- resolution: - fixed stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-08-19 Thread Antoine Pitrou
Antoine Pitrou added the comment: The bug still fails on a regular basis on the Windows buildbots: == FAIL: test_bug7732 (test.test_imp.ImportTests) --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-08-19 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4f7845be9e23 by Antoine Pitrou in branch 'default': Issue #7732: try to fix test_bug7732's flakiness on Windows by executing it in a fresh temporary directory. http://hg.python.org/cpython/rev/4f7845be9e23 --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-06-24 Thread STINNER Victor
STINNER Victor added the comment: The test just failed on x86 Windows Server 2003 [SB] 3.x: http://buildbot.python.org/all/builders/x86%20Windows%20Server%202003%20%5BSB%5D%203.x/builds/1077/steps/test/logs/stdio == FAIL:

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2013-06-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset bf882390713c by Brett Cannon in branch 'default': Issue #7732: Move an imp.find_module test from test_import to http://hg.python.org/cpython/rev/bf882390713c -- ___ Python tracker rep...@bugs.python.org

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-11-16 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@haypocalc.com: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-11-14 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 555871844962 by Victor Stinner in branch '2.7': Issue #7732: Try to fix the a failing test on Windows http://hg.python.org/cpython/rev/555871844962 -- ___ Python tracker

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-11-12 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: Victor, can you fix the test failures on Windows and 2.7? Otherwise the commit should be reverted. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-10-05 Thread Antoine Pitrou
Antoine Pitrou pit...@free.fr added the comment: This broke the Windows buildbots in Python 2.7. -- assignee: - haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-09-23 Thread Barry A. Warsaw
Barry A. Warsaw ba...@python.org added the comment: Note that Python 2.6 is also vulnerable to the crash. While we do not have an exploit, we did get a report on security@ which led to this bug. I could be convinced to allow the patch to 2.6 on grounds that if the crasher can be exploited,

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-09-23 Thread Barry A. Warsaw
Changes by Barry A. Warsaw ba...@python.org: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-09-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 125887a41a6f by Victor Stinner in branch '3.2': Issue #7732: Don't open a directory as a file anymore while importing a http://hg.python.org/cpython/rev/125887a41a6f New changeset 8c6fea5794b2 by Victor Stinner in

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-09-23 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 0f5b64630fda by Victor Stinner in branch '2.7': Issue #7732: Fix a crash on importing a module if a directory has the same name http://hg.python.org/cpython/rev/0f5b64630fda --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: import_directory-py3k.patch: find_module_path_list() ignores silently directories matching requested filename pattern (like module_name + .py). I don't think that it is useful to emit a warning (or raise an error) here, the code

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-06-20 Thread STINNER Victor
STINNER Victor victor.stin...@haypocalc.com added the comment: pyfile_fromfile_close.patch: patch based on issue7732_find_module_v2.diff, fixing this issue in Python 2.7 - PyFile_FromFile() closes the file on PyString_FromString() failure (note: unlikely failure) - call_find_module()

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-06-12 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- versions: +Python 3.3 -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2011-06-12 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list mailing list

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-08-08 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: According to message http://bugs.python.org/issue7732#msg102702, someone should write a patch for 3.x too. -- assignee: flox - stage: patch review - needs patch versions: +Python 3.1, Python 3.2

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-07-14 Thread Mark Lawrence
Mark Lawrence breamore...@yahoo.co.uk added the comment: Quote from ncoghlan on msg102699 Florent's patch looks correct. Does anyone else wish to comment or can this be taken forward? -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-04-09 Thread Florent Xicluna
Florent Xicluna florent.xicl...@gmail.com added the comment: see also http://bugs.python.org/issue8352#msg102662 -- nosy: +doko, l0nwlf, ncoghlan, orsenthil ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-04-09 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: I can reproduce this locally. I believe it is relevant that a simple import crash (with crash.py as the directory) doesn't cause a problem - there must be something higher in the import machinery which avoids the issue. -- assignee:

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-04-09 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: Ah, OK - the problem is confined solely to the wrapper for the Python imp module function. The normal import machinery doesn't go through the wrapper and hence doesn't have the problem. The PyFile_FromFile logic is a little convoluted, but

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-04-09 Thread Nick Coghlan
Nick Coghlan ncogh...@gmail.com added the comment: An interesting part of this story is *why* it doesn't crash in Py3k (despite explicitly closing the file descriptor in the same way as 2.x closes the C file pointer). The reason is that PyFile_FromFd (the closest Py3k equivalent to

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-04-09 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc amaur...@gmail.com added the comment: This is slightly incorrect: if PyFile_FromFile fails for another reason (PyString_FromString(name) runs out of memory), the fp is not closed and the caller is right to call fclose(). IMO PyFile_FromFile() should be changed to

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15937/issue7732_find_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: if PyFile_FromFile fails for another reason (PyString_FromString(name) runs out of memory), the fp is not closed and the caller is right to call fclose(). As far as I understand, the fp is never left open, when PyFile_FromFile returns NULL.

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: Note that the fp gets set with `fill_file_fields()` and that is called after the error return of `PyString_FromString()`. Hence, the fp is left open if `PyString_FromString()` returns NULL. --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: AFAICT, in this case, if PyString_FromString gives NULL, then (o_name == NULL) and the function returns without calling fill_file_fields. Hence, the fp is not opened. Do you suggest something else? --

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-28 Thread Trundle
Trundle andy-pyt...@hammerhartes.de added the comment: `fill_file_fields()` does not open the fp, the caller of `PyFile_FromFile()` opens the fp. I don't have a better idea, that's why I don't have provided a patch. -- ___ Python tracker

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Trundle
New submission from Trundle andy-pyt...@hammerhartes.de: Create a directory __init__.py and execute import imp imp.find_module('__init__', ['.']) to reproduce that issue. It will crash because Python tries to double-close a file pointer: `call_find_module` will call `PyFile_FromFile`, but

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Confirmed on trunk. ~ $ mkdir foo.py ~ $ ./python -c 'import imp;imp.find_module(foo, [.])' *** glibc detected *** ./python: double free or corruption (!prev): 0x024a7390 *** === Backtrace: = (...) -- nosy: +flox

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread R. David Murray
R. David Murray rdmur...@bitdance.com added the comment: Confirmed that this does not affect py3k. -- nosy: +brett.cannon, r.david.murray priority: - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Patch proposed. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___ ___ Python-bugs-list

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: -- keywords: +patch Added file: http://bugs.python.org/file15936/issue7732_find_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Florent Xicluna
Changes by Florent Xicluna la...@yahoo.fr: Removed file: http://bugs.python.org/file15936/issue7732_find_module.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7732 ___

[issue7732] imp.find_module crashes Python if there exists a directory named __init__.py

2010-01-18 Thread Florent Xicluna
Florent Xicluna la...@yahoo.fr added the comment: Removed the EnvironmentVarGuard from the test. It does not make sense. -- Added file: http://bugs.python.org/file15937/issue7732_find_module.diff ___ Python tracker rep...@bugs.python.org