You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As @millenomi noticed in the review of pull #2877, the implementation of XMLParser is not reentrant.
Currently (before and after pull 2877), the XMLParser instance used for SAX callbacks is stored as a thread local object. After parsing, the object is reset to NULL. Thus, if any of the callbacks creates its own instance of XMLParser and parses XML data, the “current“ instance is reset to NULL after the end of this callback. Since the SAX run of the original parser might trigger subsequent callback calls, these calls loose the connection to their “current“ parser instance.
I see several potential fixes for this problem but did not have the time to analyze it in detail:
Reset the previous XMLParser instead of setting to NULL.
Replace the “current XMLParser“ by a stack of parsers.
Change the CFXMLParser-Interface to include the XMLParser as user info
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: b784a0a3dab8bc2d51d040e1b1b8d50b
Issue Description:
As @millenomi noticed in the review of pull #2877, the implementation of XMLParser is not reentrant.
Currently (before and after pull 2877), the XMLParser instance used for SAX callbacks is stored as a thread local object. After parsing, the object is reset to
NULL
. Thus, if any of the callbacks creates its own instance of XMLParser and parses XML data, the “current“ instance is reset toNULL
after the end of this callback. Since the SAX run of the original parser might trigger subsequent callback calls, these calls loose the connection to their “current“ parser instance.I see several potential fixes for this problem but did not have the time to analyze it in detail:
Reset the previous XMLParser instead of setting to
NULL
.Replace the “current XMLParser“ by a stack of parsers.
Change the CFXMLParser-Interface to include the XMLParser as user info
The text was updated successfully, but these errors were encountered: