This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 7.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/7.0.x by this push:
new 1221690 Fix concurrency issue. Double-check locking needs volatile.
1221690 is described below
commit 122169007770803a7a4367e5d4e07d061dd8058e
Author: Mark Thomas <[email protected]>
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 ae07b6f..de74c4f 100644
--- a/java/org/apache/tomcat/util/buf/StringCache.java
+++ b/java/org/apache/tomcat/util/buf/StringCache.java
@@ -76,7 +76,7 @@ public class StringCache {
/**
* Cache for byte chunk.
*/
- protected static ByteEntry[] bcCache = null;
+ protected static volatile ByteEntry[] bcCache = null;
/**
@@ -95,7 +95,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 f39a2e3..416c250 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -65,6 +65,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>
</section>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]