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 2001/09/20 16:26:18 UTC

DO NOT REPLY [Bug 3750] New: - GeneralAttributeCheck threading bug

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=3750>.
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=3750

GeneralAttributeCheck threading bug

           Summary: GeneralAttributeCheck threading bug
           Product: Xerces-C++
           Version: 1.5.1
          Platform: All
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Critical
          Priority: Other
         Component: Validating Parser (Schema) (Xerces 1.5 or up only)
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: james.murphy@excelergy.com


It appears as though
the GeneralAttributeCheck has a static instance (singleton) of its self that
it hands out to TraverseSchema.  This isn't a problem but the fact that
GeneralAttributeCheck contains an XMLBuffer instance that it uses for
various string manipulations is the issue.  In GeneralAttributeCheck.cpp
line 792, the XMLBuffer fBuffer member is used to store the attribute value.
The raw buffer is passed to validate() to perform validation.  If another
thread is performing attribute validation fBuffer is overwritten.  This
causes the validation to fail.

Suggested Fix: Remove fBuffer from the class and create XMLBuffer instances on 
the stack instead.  This will increase heap usage but prevent memory overwrites.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org