You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2015/10/16 17:48:05 UTC
[jira] [Updated] (LANG-1170) Data Race in
StringEscapeUtils.escapeXml
[ https://issues.apache.org/jira/browse/LANG-1170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Benedikt Ritter updated LANG-1170:
----------------------------------
Description:
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
was:
Calling StringEscapeUtils.escapeXml from many threads creates a data race in the methods:
private String[] lookupTable() {
if (lookupTable == null) {
createLookupTable();
}
return lookupTable;
}
Here are the stacktraces from my test:
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
Data Race was found using http://vmlens.com
> 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)