You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@santuario.apache.org by "Scott Cantor (JIRA)" <ji...@apache.org> on 2011/04/15 23:18:06 UTC

[jira] [Commented] (SANTUARIO-268) TXFMXPathFilter->evaluateExpr crashes on Windows

    [ https://issues.apache.org/jira/browse/SANTUARIO-268?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13020432#comment-13020432 ] 

Scott Cantor commented on SANTUARIO-268:
----------------------------------------

Thanks. The fix is actually to compare directly to end() rather than use < or > logic, that's not how STL works. I'll see if I can find any other cases like that.

As for the interface, passing STL objects across DLLs works fine in modern compilers and systems and obviously it would be a breaking API change to alter it. But there's really no need to; you might want to inquire on the list if you're having an issue with it.

But it is most definitely acceptable to do that. Anything suggesting otherwise is either mistaken or out of date.

> TXFMXPathFilter->evaluateExpr crashes on Windows
> ------------------------------------------------
>
>                 Key: SANTUARIO-268
>                 URL: https://issues.apache.org/jira/browse/SANTUARIO-268
>             Project: Santuario
>          Issue Type: Bug
>          Components: C++
>    Affects Versions: C++ 1.6.0
>         Environment: Windows, Visual Studio 2005
>            Reporter: Patrick Hagelkruys
>            Assignee: Scott Cantor
>         Attachments: patch.txt
>
>
> In the evaluateExpr function of the TXFMXPathFilter class, the iteration over the std::vector crashes, caused by the for loop.
> The iterator is set to std::vector->begin and incremeted before the fist loop run, changing the loop incrementer from ++i to i++ fixed this problem. This only crashes if the std::vector hast only one item. 
> The evaluateExpr function of the TXFMXPathFilter class takes an std::vector as Parameter. Passing std::vector accross DLLs does not allways work on Windows, and its recommended not to do that. 
> As solution I added an class function taking an sinlge DSIGXPathFilterExpr as parameter, creating an std::vector array with this filter and passing the filter to the evaluateExpr function. 

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira