commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Pitts (Closed) (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (OGNL-25) Check on Concurrency correctness of SimpleNode.evaluateGetValueBody
Date Tue, 27 Sep 2011 23:00:46 GMT

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

Daniel Pitts closed OGNL-25.
----------------------------

    Resolution: Not A Problem
    
> Check on Concurrency correctness of SimpleNode.evaluateGetValueBody
> -------------------------------------------------------------------
>
>                 Key: OGNL-25
>                 URL: https://issues.apache.org/jira/browse/OGNL-25
>             Project: OGNL
>          Issue Type: Bug
>            Reporter: Daniel Pitts
>
> Looking at this, it looks suspiciously like it has concurrency issues.
> In particular:
> <code>
>         if ( !_constantValueCalculated )
>         {
>             _constantValueCalculated = true;
>             boolean constant = isConstant( context );
>             if ( constant )
>             {
>                 _constantValue = getValueBody( context, source );
>             }
>             _hasConstantValue = constant;
>         }
> </code>
> In concurrent situations, _constValueCalculated could get set to true, before the rest
of the if statement is completed.  On top of that, _constantValueCalculated isn't volatile,
so there is no appropriate memory barrier and data may not be set as expected.
> I'll attach a patch which should fix the issues.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message