You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by "David Bertoni (JIRA)" <xa...@xml.apache.org> on 2010/11/14 21:05:14 UTC

[jira] Assigned: (XALANC-707) XalanVector::insert bug

     [ https://issues.apache.org/jira/browse/XALANC-707?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Bertoni reassigned XALANC-707:
------------------------------------

    Assignee: David Bertoni

> 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: xalan-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-dev-help@xml.apache.org