Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Major problems with string handling in expat

From: "Martin Gudgin" <marting@-------.--->
To: "XML-Dev Mailing list" <xml-dev@---.--->
Date: 6/30/2000 11:54:00 PM
Hi Everyone,

In trying to use expat a lot recently we have found lots of problems with
shallow copies of pointers into string pools in addition to a couple of
wchar_t bugs.

We're especially interested to know if anyone has fixes for the string
pointer bugs.

We think it's a couple of days work to fix the problems and none has fixes
already we'll do the work and pass the resulting code on the jjc. We just
want to avoid duplicating what someone has already done if possible.

When the PREFIX is added to the hash table the string is only a shallow copy
and it doesn't take much for the pointers to get trashed when the buffers
get reallocated in the pool. This means the pointer to the string containing
the URI is pointing to garbage and consequently the URI never gets matched
:-(

The problem is fairly random but we come across it when doing a lot of
namespace work. One simple test case is;

<foo xmlns='http://marting.develop.com/foo' xml:lang='en-us'/>

where the nsuri for the xml namespace which expat pre-caches gets trashed
and the attribute is fed to the application with the xml prefix instead of
the nsuri.

We're using expat 1.1 ( latest source file date stamp 29th May 1999 )

Regards

Don Box and Martin Gudgin
DevelopMentor



***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent