You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2019/04/17 11:58:44 UTC
[tomcat] branch master updated: Fix concurrency issue. Double-check
locking needs volatile.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/master by this push:
new 0ca0596 Fix concurrency issue. Double-check locking needs volatile.
0ca0596 is described below
commit 0ca05961f1bdd685be22bb5a81072ad85cad3b03
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Apr 17 12:58:28 2019 +0100
Fix concurrency issue. Double-check locking needs volatile.
---
java/org/apache/tomcat/util/buf/StringCache.java | 4 ++--
webapps/docs/changelog.xml | 4 ++++
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/tomcat/util/buf/StringCache.java b/java/org/apache/tomcat/util/buf/StringCache.java
index cd599aa..84acd19 100644
--- a/java/org/apache/tomcat/util/buf/StringCache.java
+++ b/java/org/apache/tomcat/util/buf/StringCache.java
@@ -79,7 +79,7 @@ public class StringCache {
/**
* Cache for byte chunk.
*/
- protected static ByteEntry[] bcCache = null;
+ protected static volatile ByteEntry[] bcCache = null;
/**
@@ -98,7 +98,7 @@ public class StringCache {
/**
* Cache for char chunk.
*/
- protected static CharEntry[] ccCache = null;
+ protected static volatile CharEntry[] ccCache = null;
/**
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index d1648f8..060e07a 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -56,6 +56,10 @@
Fix a potential resource leak when executing CGI scripts from a WAR
file. Identified by Coverity scan. (markt)
</fix>
+ <fix>
+ Fix a potential concurrency issue in the StringCache identifed by
+ Coverity scan. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Coyote">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org