OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Major problems with string handling in expat

[ Lists Home | Date Index | Thread Index ]
  • From: "Martin Gudgin" <marting@develop.com>
  • To: "XML-Dev Mailing list" <xml-dev@xml.org>
  • Date: Sat, 1 Jul 2000 08:46:06 +0100

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@xml.org&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS