[JIRA] Resolved: (CPPOST-70) Problem calling virtual functions from base class constructors
Scott Cantor (JIRA)
noreply at shibboleth.net
Mon Nov 21 21:50:25 GMT 2011
[ https://issues.shibboleth.net/jira/browse/CPPOST-70?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Cantor resolved CPPOST-70.
--------------------------------
Resolution: Fixed
http://svn.shibboleth.net/view/cpp-xmltooling?rev=927&view=rev
http://svn.shibboleth.net/view/cpp-opensaml?rev=681&view=rev
Added clone step to unit test base class, all tests pass on 12.3 compiler.
> Problem calling virtual functions from base class constructors
> --------------------------------------------------------------
>
> Key: CPPOST-70
> URL: https://issues.shibboleth.net/jira/browse/CPPOST-70
> Project: OpenSAML 2 - C++
> Issue Type: Bug
> Components: SAML 1, SAML 2
> Affects Versions: 2.4, 2.4.1, 2.4.2, 2.4.3
> Environment: Solaris 10, both archs, compiler package version > 12.0
> Reporter: Scott Cantor
> Assignee: Scott Cantor
> Priority: Critical
> Fix For: 2.5
>
> Original Estimate: 1 week
> Time Spent: 3 days
> Remaining Estimate: 2 days
>
> Since at least 12.2 of SunStudio, running unit tests crashes in a test case that clones an AuthenticationStatement. The crash shows a stack trace that isn't possible, and the this pointer changes in the debugger across calls such that the compiler seems to be trashing the object in some way when it executes the call.
> I've traced it to the use of virtual methods inside base class constructors, in this case SubjectStatementImpl calling setSubject, which calls a virtual releaseDOM method. Moving that down to the subclass constructor fixes the crash.
> It should be possible to rework these clone operations as two stages, one to initialize an empty object via copy constructor, and then an internal _clone method that actually copies the content.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the commits
mailing list