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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to