From noreply at sourceforge.net Thu May 1 12:24:47 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Thu, 01 May 2008 03:24:47 -0700 Subject: [Expat-bugs] [ expat-Bugs-1873199 ] CharacterDataHandler ampersand problem Message-ID: Bugs item #1873199, was opened at 2008-01-16 12:37 Message generated for change (Comment added) made by nobody You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: Rejected Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Karl Waclawek (kwaclaw) Summary: CharacterDataHandler ampersand problem Initial Comment: If you parse A&B, the characterdatahandler is called 3 times, each with the nodename of tagname, first with A, then with &, then with B dan at cappannari.com ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-05-01 03:24 Message: Logged In: NO It's absolutely normal parser behaviour. Extraction from expat documentation: "...A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may be split across calls to this handler...". Please refer to the documentation in the future before submitting any bug. ---------------------------------------------------------------------- Comment By: Sebastian Pipping (hartwork) Date: 2008-01-18 16:56 Message: Logged In: YES user_id=1022691 Originator: NO Expat is decoding entities on the fly so & is exptected to give "&" in the char data handler. In case that was not clear already. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2008-01-16 13:04 Message: Logged In: YES user_id=290026 Originator: NO This is legal behaviour. You can have multiple call-backs for a contiguous text string. This also (if I remember correctly) happens for line breaks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127 From noreply at sourceforge.net Tue May 6 15:17:45 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 06:17:45 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958721 ] segmentation Message-ID: Bugs item #1958721, was opened at 2008-05-06 06:17 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958721&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: segmentation Initial Comment: segmentation ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958721&group_id=10127 From noreply at sourceforge.net Tue May 6 15:24:50 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 06:24:50 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958727 ] segfault Message-ID: Bugs item #1958727, was opened at 2008-05-06 06:24 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958727&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: segfault Initial Comment: segfault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958727&group_id=10127 From noreply at sourceforge.net Tue May 6 15:27:32 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 06:27:32 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958732 ] seg Message-ID: Bugs item #1958732, was opened at 2008-05-06 06:27 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958732&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: seg Initial Comment: segfault ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958732&group_id=10127 From noreply at sourceforge.net Wed May 7 03:33:06 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 18:33:06 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958727 ] segfault Message-ID: Bugs item #1958727, was opened at 2008-05-06 09:24 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958727&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: segfault Initial Comment: segfault ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-06 21:33 Message: Logged In: YES user_id=290026 Originator: NO Not a valid bug report. Closing it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958727&group_id=10127 From noreply at sourceforge.net Wed May 7 03:33:29 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 18:33:29 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958721 ] segmentation Message-ID: Bugs item #1958721, was opened at 2008-05-06 09:17 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958721&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: segmentation Initial Comment: segmentation ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-06 21:33 Message: Logged In: YES user_id=290026 Originator: NO Not a valid bug report. Closing it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958721&group_id=10127 From noreply at sourceforge.net Wed May 7 03:33:47 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 18:33:47 -0700 Subject: [Expat-bugs] [ expat-Bugs-1958732 ] seg Message-ID: Bugs item #1958732, was opened at 2008-05-06 09:27 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958732&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: seg Initial Comment: segfault ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-06 21:33 Message: Logged In: YES user_id=290026 Originator: NO Not a valid bug report. Closing it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1958732&group_id=10127 From noreply at sourceforge.net Wed May 7 03:34:21 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 06 May 2008 18:34:21 -0700 Subject: [Expat-bugs] [ expat-Bugs-1873199 ] CharacterDataHandler ampersand problem Message-ID: Bugs item #1873199, was opened at 2008-01-16 15:37 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Rejected Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Karl Waclawek (kwaclaw) Summary: CharacterDataHandler ampersand problem Initial Comment: If you parse A&B, the characterdatahandler is called 3 times, each with the nodename of tagname, first with A, then with &, then with B dan at cappannari.com ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-06 21:34 Message: Logged In: YES user_id=290026 Originator: NO OK, time to close this issue. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2008-05-01 06:24 Message: Logged In: NO It's absolutely normal parser behaviour. Extraction from expat documentation: "...A single block of contiguous text free of markup may still result in a sequence of calls to this handler. In other words, if you're searching for a pattern in the text, it may be split across calls to this handler...". Please refer to the documentation in the future before submitting any bug. ---------------------------------------------------------------------- Comment By: Sebastian Pipping (hartwork) Date: 2008-01-18 19:56 Message: Logged In: YES user_id=1022691 Originator: NO Expat is decoding entities on the fly so & is exptected to give "&" in the char data handler. In case that was not clear already. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2008-01-16 16:04 Message: Logged In: YES user_id=290026 Originator: NO This is legal behaviour. You can have multiple call-backs for a contiguous text string. This also (if I remember correctly) happens for line breaks. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1873199&group_id=10127 From noreply at sourceforge.net Wed May 7 15:10:39 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 07 May 2008 06:10:39 -0700 Subject: [Expat-bugs] [ expat-Bugs-1959511 ] UTF Message-ID: Bugs item #1959511, was opened at 2008-05-07 06:10 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959511&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: UTF Initial Comment: UTF ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959511&group_id=10127 From noreply at sourceforge.net Wed May 7 15:12:56 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 07 May 2008 06:12:56 -0700 Subject: [Expat-bugs] [ expat-Bugs-1959513 ] UTF support Message-ID: Bugs item #1959513, was opened at 2008-05-07 06:12 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959513&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: UTF support Initial Comment: UTF support ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959513&group_id=10127 From noreply at sourceforge.net Wed May 7 17:00:21 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 07 May 2008 08:00:21 -0700 Subject: [Expat-bugs] [ expat-Bugs-1959513 ] UTF support Message-ID: Bugs item #1959513, was opened at 2008-05-07 09:12 Message generated for change (Settings changed) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959513&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: UTF support Initial Comment: UTF support ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-07 11:00 Message: Logged In: YES user_id=290026 Originator: NO Not a valid bug report - closing it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959513&group_id=10127 From noreply at sourceforge.net Wed May 7 17:00:43 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Wed, 07 May 2008 08:00:43 -0700 Subject: [Expat-bugs] [ expat-Bugs-1959511 ] UTF Message-ID: Bugs item #1959511, was opened at 2008-05-07 09:10 Message generated for change (Comment added) made by kwaclaw You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959511&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: UTF Initial Comment: UTF ---------------------------------------------------------------------- >Comment By: Karl Waclawek (kwaclaw) Date: 2008-05-07 11:00 Message: Logged In: YES user_id=290026 Originator: NO Not a valid bug report - closing it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1959511&group_id=10127 From noreply at sourceforge.net Fri May 9 15:58:17 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Fri, 09 May 2008 06:58:17 -0700 Subject: [Expat-bugs] [ expat-Bugs-1961022 ] gpujqcjVOT Message-ID: Bugs item #1961022, was opened at 2008-05-09 06:58 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1961022&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: www.libexpat.org Group: Platform Specific Status: Open Resolution: None Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: gpujqcjVOT Initial Comment: QwOLHW hi nice site thx http://peace.com ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1961022&group_id=10127 From noreply at sourceforge.net Wed May 14 04:56:46 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 13 May 2008 19:56:46 -0700 Subject: [Expat-bugs] [ expat-Bugs-1961022 ] gpujqcjVOT Message-ID: Bugs item #1961022, was opened at 2008-05-09 09:58 Message generated for change (Comment added) made by fdrake You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1961022&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: www.libexpat.org Group: Platform Specific >Status: Closed >Resolution: Invalid Priority: 5 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: gpujqcjVOT Initial Comment: QwOLHW hi nice site thx http://peace.com ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2008-05-13 22:56 Message: Logged In: YES user_id=3066 Originator: NO Destroy all spam. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1961022&group_id=10127 From noreply at sourceforge.net Wed May 14 05:02:22 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 13 May 2008 20:02:22 -0700 Subject: [Expat-bugs] [ expat-Bugs-448234 ] Features added since older version Message-ID: Bugs item #448234, was opened at 2001-08-05 16:30 Message generated for change (Comment added) made by fdrake You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=448234&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: Not a Bug >Status: Closed >Resolution: Wont Fix Priority: 4 Private: No Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Features added since older version Initial Comment: >From comparing Expat 1.2 from jclark.com and a current CVS snapshot, it is clear that some significant changes have been made. Can you please provide a list of features that have been added and changes that have been made since 1.2? Thanks, Mike ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2008-05-13 23:02 Message: Logged In: YES user_id=3066 Originator: NO Recent versions have included better change recording, and the old changes are now so old as to be nearly uninteresting. Resolving as "Won't Fix" since nobody seems actively interesting in the old change information, and no one is likely to write them up unless they're interested themselves. Patches can still be accepted if anyone's sufficiently motivated to write up the changes. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-01 11:40 Message: Logged In: YES user_id=3066 This should be done, but I've (clearly) not had time, and it doesn't seem to be a high priority or someone would have contributed a patch. Un-assigning since I'm not getting to this, and revised the summary since this isn't really specific to changes from 1.2 (though that's an important part of this, since there were so many additions between 1.2 and 1.95). ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=448234&group_id=10127 From noreply at sourceforge.net Wed May 14 05:06:04 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 13 May 2008 20:06:04 -0700 Subject: [Expat-bugs] [ expat-Bugs-676131 ] Need documentation for migration path. Message-ID: Bugs item #676131, was opened at 2003-01-28 10:24 Message generated for change (Settings changed) made by fdrake You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=676131&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: Documentation Group: None >Status: Closed >Resolution: Wont Fix Priority: 5 Private: No Submitted By: Fred L. Drake, Jr. (fdrake) Assigned to: Nobody/Anonymous (nobody) Summary: Need documentation for migration path. Initial Comment: There needs to be more documentation for people upgrading from older versions of Expat. This includes (but is not limited to!) the introduction of the XML_Status enumeration and annotations in the documentation for when each API construct was added to the library. ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2008-05-13 23:06 Message: Logged In: YES user_id=3066 Originator: YES Recent versions have included better change recording, and the changes to update from amongst the newer versions are reasonably clear. Resolving as "Won't Fix" since nobody seems actively interesting in the old change information, and no one is likely to write them up unless they're interested themselves. Patches can still be accepted if anyone's sufficiently motivated to write something. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-01 12:03 Message: Logged In: YES user_id=3066 Indeed, there should be such documentation for this. Un-assigning from myself due to time availability. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=676131&group_id=10127 From noreply at sourceforge.net Wed May 14 05:10:55 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Tue, 13 May 2008 20:10:55 -0700 Subject: [Expat-bugs] [ expat-Bugs-1828723 ] parser cannot handle a comment containing a double dash Message-ID: Bugs item #1828723, was opened at 2007-11-08 21:40 Message generated for change (Comment added) made by fdrake You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1828723&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None >Status: Closed Resolution: Rejected Priority: 5 Private: No Submitted By: Ryan (rad_rb) Assigned to: Nobody/Anonymous (nobody) Summary: parser cannot handle a comment containing a double dash Initial Comment: when attempting to parse a comment containing a double dash, the parser throws an exception stating that the double dash is not well formed: import xml.parsers.expat p = xml.parsers.expat.ParserCreate() p.Parse('') Traceback (most recent call last): File "test-expat.py", line 3, in ? p.Parse('') xml.parsers.expat.ExpatError: not well-formed (invalid token): line 1, column 7 I'm using version 1.1, which shipped with python 2.4 ---------------------------------------------------------------------- >Comment By: Fred L. Drake, Jr. (fdrake) Date: 2008-05-13 23:10 Message: Logged In: YES user_id=3066 Originator: NO Marking this closed since it has been rejected. There is no way to encode "--" inside a comment such that "--" appears in the comment content reported by Expat. If you're relying on being able to get "--" from a comment, there's something wrong with your data model (unhappily; I realize dealing with legacy data can be a pain). If possible, consider using a processing instruction, which can contain just about anything, through a pseudo-attribute syntax is often used by convention. ---------------------------------------------------------------------- Comment By: Nobody/Anonymous (nobody) Date: 2007-11-09 13:41 Message: Logged In: NO wow. OK, I guess expat has the right behaviour. I want to log a bug on the XML spec though. that's just so wrong... :P is there some alternate character sequence that would allow us to encode the data we want, that expat will return as "--"? ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2007-11-08 23:04 Message: Logged In: YES user_id=290026 Originator: NO This is not allowed - Expat is correct. See http://www.w3.org/TR/2006/REC-xml-20060816/#sec-comments. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1828723&group_id=10127 From noreply at sourceforge.net Sun May 25 01:50:42 2008 From: noreply at sourceforge.net (SourceForge.net) Date: Sat, 24 May 2008 16:50:42 -0700 Subject: [Expat-bugs] [ expat-Bugs-1515266 ] missing check of stopped parser in doContent() 'for' loop Message-ID: Bugs item #1515266, was opened at 2006-06-30 19:04 Message generated for change (Comment added) made by dleverton You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1515266&group_id=10127 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: Test Required Status: Open Resolution: Fixed Priority: 5 Private: No Submitted By: Brett Cannon (bcannon) Assigned to: Fred L. Drake, Jr. (fdrake) Summary: missing check of stopped parser in doContent() 'for' loop Initial Comment: In Expat 2.0.0, in expat.c:doConvert() there is a 'for' loop for the XML_TOK_DATA_CHARS case. There is unfortunately no check in that loop whether the parser was stopped during that call because of an error. This was discovered in Python (Lib/test/crashers/xml_parsers.py) because pyexpat, upon error where there is no error return code like with characterDataHandlers, sets all handlers to 0, sets parsingStatus to XML_FINISHED, and sets errorCode. This leads to a segfault if the 'for' loop goes around again because parser->m_characterDataHandler is set to 0. A simple check if the parser is stopped fixes the problem. I have attached a simple patch that just breaks out of the loop and lets execution fall through to the bottom of the 'switch' statement. I don't know if returning errorCode directly would be better or if checking for XML_SUSPENDED is also desirable. ---------------------------------------------------------------------- Comment By: David Leverton (dleverton) Date: 2008-05-25 00:50 Message: Logged In: YES user_id=2011415 Originator: NO > Python compatibility still needs testing. This does indeed break Python: when it clears the handler, it sets the variable containing the Python-side handler to NULL, and then assumes that said variable is non-null when expat calls the old handler. (The vanilla Python distribution uses a bundled copy of expat from before this change was made, which is probably why no-one's complained until now, but some Linux distros like to use the system copy instead of the bundled one.) ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-11-25 17:41 Message: Logged In: YES user_id=290026 Originator: NO Is anyone testing CVS for this solution? ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-10 20:02 Message: Logged In: YES user_id=290026 Applied the patch preserving default handler failover. See xmlparse.c rev. 1.158. Docs updated as well. Python compatibility still needs testing. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-06 18:19 Message: Logged In: YES user_id=290026 I am attaching a patch to current CVS that preserves the default handler failover logic by saving the character data handler to a local variable instead of moving the NULL check into the inner for loop (file "localCharDataHandlerPatch.diff"). The drawback: Even if the handler is cleared, it will be called back on as long as the inner for loop is active. Could be a problem for Python, if it cannot deal with a few more call-backs despite clearing the handlers. ---------------------------------------------------------------------- Comment By: Brett Cannon (bcannon) Date: 2006-07-06 18:03 Message: Logged In: YES user_id=357491 Yes, I'm listening, Fred. =) If you look at PEP 356 (http://www.python.org/dev/peps/pep-0356/) it seems like b2 is due on July 12 and rc1 August 1. So there is still time to get whatever change/fix needed to Python's wrapper before we hit final release. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-06 13:56 Message: Logged In: YES user_id=290026 One way to preserver the old default handler logic would be this: Revert back to the original code, but save the character data handler into a local variable for the duration of the inner for loop. This would prevent the segfault, but would enforce the call-backs in the loop to go on until the loop terminates, even if the character data handler was cleared. I personally like this solution, but the question is how Python could handle it if there were more call-backs even after the handlers were cleared. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-06 06:15 Message: Logged In: YES user_id=3066 Python (on the trunk) is no longer quite as sensitive to the Expat implementation for this, so that's not a source of time pressure to come up with the final fix for this. Reducing priority back to "Medium" ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-06 04:23 Message: Logged In: YES user_id=3066 The tests now pass, but agree that the lack of falling back to the default handler is undesirable. As noted, I'm not sure how much we want to worry about this in code, though, rather than through documentation. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-06 03:55 Message: Logged In: YES user_id=290026 The bug is quite obvious when you look at it. When the character data handler is cleared, the for loop will do nothing forever. Please check again with xmlparse.c rev. 1.157. However this quick fix is not quite satisfying. There is one piece of logic that becomes ill-fitted now: the "fail-over" to the default handler does not work as expected anymore, so I'll have some more thinking to do. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-06 03:38 Message: Logged In: YES user_id=3066 The tests no longer complete, but take up all the CPU the system will let them have. Hallmarks of an infinite loop, if you ask me. :-) Are you able to run the tests on Windows? I don't know if a MSVC++ target was ever built for them, and don't have access to a Windows development machine most of the time. One thing that can be done is to document that the character data handler can't be removed (though it can be replaced), during parsing, except from some non-character data (and non-decoding-related) handler. Then the Python bindings can use an alternate approach, replacing the character handler with a completely no-op handler until it can be safely removed completely. Brett, are you still paying attention? I can make the needed changes to the Python bindings to isolate those from some of the changes in Expat, hopefully no later than sometime this weekend. Not sure what the release schedule is, though. Karl, I'm generally inclined to make Expat as safe from segfaults as possible, so I'd like things to "just work" in even some of the oddball scenarios that exception-handling wrappers built to support scripting languages might present, though I don't object to making them go through a bit of extra work. I know our main audience is very performance-sensitive, so I don't want to pay too high a cost on that front. It might be worth taking the discussion of alternatives to the mailing list, but I vaguely recall that we've done that before. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-05 14:26 Message: Logged In: YES user_id=290026 Corrected Summary. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-05 14:14 Message: Logged In: YES user_id=290026 Applied the patch for bug # 1515600 which solves this issue as well. Removed the check for XML_FINISHED/XML_SUSPENDED. We could discuss special treatment of XML_FINISHED, but if one is clearing all handlers anyway, then special treatment of XML_FINISHED is not necessary. For Fred: I have not re-run the test cases. Please do so and close the issue if successful. ---------------------------------------------------------------------- Comment By: Karl Waclawek (kwaclaw) Date: 2006-07-04 14:37 Message: Logged In: YES user_id=290026 I am re-opening this issue because in the case of a suspended parser, breaking out of the inner loop in XML_TOK_DATA_CHARS means that character call-backs are missed when resuming the parser. We should let the inner loop finish reporting all characters. The documentation already states that after calling XML_StopParser() there may still be a few call-backs that would otherwise be missed, so this would not be new behaviour, but consistent with existing behaviour. The solution to the problem described is the same as suggested for bug # 1515600 (Segfault after removing character data handler). Just put the NULL check for the character data handler inside the internal loop. Btw, the same problem exists in the doCdataSection() function. I'll attach a patch suggestion to bug # 1515600. We might decide to treat XML_FINISHED different from XML_SUSPENDED such that no other call-backs will happen, but in that case we need to review all the other places where this would need to be done as well (and update the documentation, of course). ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-01 16:32 Message: Logged In: YES user_id=3066 Confirmed that the suspend behavior parallels the abort behavior Brett's patch fixed; fixed and added a regression test in lib/xmlparse.c 1.155 and tests/runtests.c 1.66. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-01 16:02 Message: Logged In: YES user_id=3066 Added a regression test in tests/runtests.c revision 1.65. Closing this report. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-07-01 05:00 Message: Logged In: YES user_id=3066 That seems fine, but can be done faster within the Expat implementation. I've committed the simplified patch as lib/xmlparse.c revision 1.154. I'll have a test case committed tomorrow as well. Leaving this report open for now since I need to finish up the test case. ---------------------------------------------------------------------- Comment By: Fred L. Drake, Jr. (fdrake) Date: 2006-06-30 19:40 Message: Logged In: YES user_id=3066 The Python folks need this dealt with before Python 2.5, so I'll try and take a look at it this weekend if no one beats me to it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=110127&aid=1515266&group_id=10127