[New-bugs-announce] [issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

David H. Gutteridge report at bugs.python.org
Wed Aug 24 00:45:04 CEST 2011


New submission from David H. Gutteridge <dhgutteridge at sympatico.ca>:

I stumbled across this bug because of a misunderstanding I had about how the pyexpat module works.  I'd inferred that a given instance could be reused to parse multiple files, which is apparently not supported.  (There's already a documentation bug open on this, see http://bugs.python.org/issue6676 -- a few other people made the same mistaken assumption as me.)  I found that given the right input, a segmentation fault occurs when one attempts to reuse the parser instance on more than one file.

The sample test case I've attached derives from what I'm using pyexpat for, which involves the parsing of Microsoft Office Open XML Excel files.  I found that the specific content in the initial file can influence whether the submission of subsequent files triggers a segmentation fault.

I'm reporting this against Python 2.7.2 on Mac OS X 10.6.8; it also occurs with Python 2.6.1 that's bundled with the OS.  I can also duplicate it on the development branch of NetBSD (my other development platform), specifically 5.99.47/amd64 with Python 2.6.7.

----------
components: Library (Lib)
files: pyexpat_crash_isolation_osx.py
messages: 142868
nosy: dhgutteridge
priority: normal
severity: normal
status: open
title: pyexpat segmentation fault caused by multiple calls to Parse()
type: crash
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file23023/pyexpat_crash_isolation_osx.py

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


More information about the New-bugs-announce mailing list