[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-31 Thread David H. Gutteridge
David H. Gutteridge added the comment: Okay. I'd seen the earlier issue, but had submitted this separately because I wasn't sure if it was a security-related bug, whereas the older issue didn't mention anything of the sort. (In retrospect, I could've just added to it...) -- ___

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-30 Thread Ned Deily
Ned Deily added the comment: This is the same issue as highlighted by Issue6676. The root cause is attempting to reuse a parser instance and that is known to not work with the version of expat included with Python. Whether the test program crashes with a memory access violation or just uses

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: This seems to be a Mac-only issue. Barry, does this seem to be a security issue to you, or should we delete 2.6 from the versions? -- assignee: -> ronaldoussoren components: +Macintosh nosy: +barry, ned.deily, ronaldoussoren

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-30 Thread Terry J. Reedy
Terry J. Reedy added the comment: My understanding is that what you did: import xml.parsers.expat is now the proper way to use expat. After some searching, it seems the sentence about direct use of pyexpat being deprecated refers to http://sourceforge.net/tracker/?func=detail&aid=2745230&group_

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-29 Thread David H. Gutteridge
David H. Gutteridge added the comment: Further details: - The original test case I'd submitted crashed on the development branch of NetBSD as well as Mac OS X Snow Leopard, but not the most recent stable branch of NetBSD. I've found a separate test case that crashes on both branches of NetB

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-29 Thread David H. Gutteridge
David H. Gutteridge added the comment: Confirming that Python 3.2.1 crashes the same way on Mac OS X 10.6.8: Process: Python [9594] Path: /Library/Frameworks/Python.framework/Versions/3.2/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ???

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-29 Thread David H. Gutteridge
David H. Gutteridge added the comment: Terry: I wasn't aware xml.parsers.expat is deprecated, though it clearly says so in the documentation, I now see... (I'd been using it because it features prominently in various examples in Python books, and it's lightweight.) I haven't tested with the

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: Running with IDLE on Windows, I get no crash or uncaught exception but got these printed lines: An error occurred during XML parsing. Error ID: 9. Error message: junk after document element Line number: 1 An error occurred during XML parsing. Error ID: 9.

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: A note for anyone else: David is actually using the xml.parsers.expat module, which uses the now undocumented pyexpat module, whose direct use is deprecated. David: Have you tested with 3.1 or 3.2? (I am about to try on Windows ;-). -- nosy: +terry.re

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-23 Thread David H. Gutteridge
David H. Gutteridge added the comment: Here's the (non-debug) trace under OS X: Process: Python [4604] Path: /Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python Identifier: Python Version: ??? (???) Code Type: X86-6

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-23 Thread David H. Gutteridge
David H. Gutteridge added the comment: I believe this may be an OS-specific bug somehow, albeit one that affects multiple OSes. I cannot duplicate the crash on NetBSD 5.1_STABLE/i386 with Python 2.6.7, or on OpenSuSE 11.3 with Python 2.6.5. (It's interesting that it doesn't crash on the old

[issue12829] pyexpat segmentation fault caused by multiple calls to Parse()

2011-08-23 Thread David H. Gutteridge
New submission from David H. Gutteridge : 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 ope