You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2003/11/14 00:18:47 UTC
DO NOT REPLY [Bug 24693] -
DOMNode::getTextContent() corrupts heap
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24693>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND
INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24693
DOMNode::getTextContent() corrupts heap
------- Additional Comments From neilg@ca.ibm.com 2003-11-13 23:18 -------
A few things:
- Sure would be handy if we had a stack trace.
- What compiler version are you using exactly?
- There are lots of poor practices in this code. They shouldn't contribute to
this bug, but you're bound to get other bugs this way. First and foremost, you
never call XMLPlatformUtils::Terminate(). Second, you have a DOMParser object
allocated on the stack with the same scope as the call to
XMLPlatformUtils::Initialize(): this is an excellent way of getting memory
violations. Third, you should really check that a node is of an appropriate
type before calling methods on it. For instance, the code that gets node names
should only really be invoked when you know you have an element node; same goes
with getTextContent(), although again this should not cause severe problems.
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org