[
https://issues.apache.org/jira/browse/XALANC-707?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931878#action_12931878
]
David Bertoni commented on XALANC-707:
--------------------------------------
Can you provide a minimal stylesheet and source document to reproduce this?
> XalanVector::insert bug
> -----------------------
>
> Key: XALANC-707
> URL: https://issues.apache.org/jira/browse/XALANC-707
> Project: XalanC
> Issue Type: Bug
> Components: XalanC
> Affects Versions: CurrentCVS
> Environment: any
> Reporter: Michael Kupchuk
> Assignee: David Bertoni
> Priority: Critical
> Attachments: XalanVector.diff
>
>
> We faced a crash in ElemComment::endElement because method iterator
> XalanVector::insert(iterator thePosition, const value_type& theData)
> returns invalid iterator.
> Our testcase has a quite complex xslt-files, but in short description we
> transform two XML-files with the same xslt-file. And Xalan crashes on second
> transformation while "fix up any occurrences of the sequence '--' in the
> comment's data by inserting a space between them".
> Here is the bug description.
> Bug place callstack:
> XalanVector::insert
> XalanDOMString::insert
> ElemComment::endElement
> ElemTemplateElement::execute
> StylesheetRoot::process
> XSLTEngineImpl::process
> XalanTransformer::doTransform
> XalanTransformer::transform
> we fall into the "true" branch of "if (m_allocation > m_size)" thus calling
> "insert(thePosition, 1, theData);" and returning old iterator thePosition.
> But in XalanVector::insert(iterator thePosition, const value_type& theData)
> we fall into the "true" branch of "if (theTotalSize > capacity())" which
> creates new vector and swaps it with "this". Therefore thePosition iterator
> becomes invalid.
--
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]