[ 
https://issues.apache.org/jira/browse/XERCESC-1652?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12603876#action_12603876
 ] 

Jesse Pelton commented on XERCESC-1652:
---------------------------------------

I'm not tracking 3.0, but I suspect so. I see that you've changed how statics 
are initialized and cleaned up, but the problem I encountered was with method 
calls on the static document, not initialization. Among the calls made using 
the global object:

DOMDocumentImpl::cloneString()
DOMDocumentImpl::getPooledString()
new (DOMDocument *) DOMNamedNodeMapImpl(this)
new (DOMDocument *, DOMMemoryManager::DOCUMENT_TYPE_OBJECT) 
DOMDocumentTypeImpl()

I haven't looked at how these are implemented lately. I don't know for sure 
that they all use member data, but it seems safest to assume that they do. If 
they don't now, they could at some future time.

> DOMDocumentTypeImpl is not thread safe
> --------------------------------------
>
>                 Key: XERCESC-1652
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1652
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM
>    Affects Versions: 2.7.0, 2.8.0
>         Environment: Multithreaded programs
>            Reporter: Jesse Pelton
>         Attachments: DOMDocumentTypeImpl.diff
>
>
> DOMDocumentTypeImpl.cpp uses a static gDocTypeDocument() method to return a 
> singleton doctype document that provides various utility services (allocating 
> named node maps, cloning strings, and so on). Any calls to methods of this 
> static document that can modify its instance data, including calls that 
> allocate memory, must be synchronized to keep the document's state consistent.
> Patch against the trunk to follow, but note that it should be reviewed 
> carefully. First, I pretty much blindly copied the synchronization code from 
> DOMImplementationRegistry.cpp and may have gotten something wrong. Second, 
> the patch is adapted from changes I made to v2.7.0 code and has not been 
> tested (or even compiled) (Updates to the trunk prevent successful 
> application of a patch against v2.7.0 to code from the trunk.) And lastly, 
> it's possible that the trunk updates obsolete my patch, though it still seems 
> relevant.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to