commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sebb (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (LANG-1170) Data Race in StringEscapeUtils.escapeXml
Date Fri, 16 Oct 2015 22:37:05 GMT

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

Sebb closed LANG-1170.
----------------------

> Data Race in StringEscapeUtils.escapeXml
> ----------------------------------------
>
>                 Key: LANG-1170
>                 URL: https://issues.apache.org/jira/browse/LANG-1170
>             Project: Commons Lang
>          Issue Type: Bug
>          Components: lang.*
>    Affects Versions: 2.6
>         Environment: Windows JDK 1.8
>            Reporter: Thomas Krieger
>            Priority: Minor
>
> Calling StringEscapeUtils.escapeXml from many threads creates a data race in the methods:
> {code:java}
>   private String[] lookupTable() {
>             if (lookupTable == null) {
>                 createLookupTable();
>             }
>             return lookupTable;
>         }
> {code}
> Here are the stacktraces from my test:
> {code}
> com/anarsoft/MultiThreadedOneInstanceTemplate.run
> com/anarsoft/mit/TestCommonsLang.exec
> org/apache/commons/lang/StringEscapeUtils.escapeXml
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.entityName
> org/apache/commons/lang/Entities$LookupEntityMap.name
> org/apache/commons/lang/Entities$LookupEntityMap.lookupTable
> org/apache/commons/lang/Entities$LookupEntityMap.createLookupTable 
> com/anarsoft/MultiThreadedOneInstanceTemplate.run
> com/anarsoft/mit/TestCommonsLang.exec
> org/apache/commons/lang/StringEscapeUtils.escapeXml
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.escape
> org/apache/commons/lang/Entities.entityName
> org/apache/commons/lang/Entities$LookupEntityMap.name
> org/apache/commons/lang/Entities$LookupEntityMap.lookupTable
> {code}
> Data Race was found using http://vmlens.com



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message