New submission from STINNER Victor <[EMAIL PROTECTED]>: Using Fusil the fuzzer, I found a "minor" bug in _hotshot module: it doesn't check correctly the errors in hotshot_logreader(). On error, an exception is raised (eg. by eof_error()) but the result is a pointer to a new allocated object instead of NULL.
Here is a patch to delete the new created object (using Py_DECREF) and return NULL. It uses an ugly goto, but goto is sometimes useful to avoid code duplication on error handling (eg. see Linux source code). Example to reproduce the bug: --- import _hotshot, gc _hotshot.logreader(".") gc.collect() --- ---------- components: Library (Lib) files: _hotshot_logreader.patch keywords: patch messages: 73700 nosy: haypo severity: normal status: open title: _hotshot: invalid error control in logreader() type: crash versions: Python 2.6 Added file: http://bugs.python.org/file11589/_hotshot_logreader.patch _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue3954> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com