This is an automated email from the ASF dual-hosted git repository.
lihan pushed a commit to branch 8.5.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/8.5.x by this push:
new dadd323662 Fix a bug that memory allocation is larger than limit in
SynchronizedStack to reduce memory footprint.
dadd323662 is described below
commit dadd323662a52e4ef7d7c0f37cac477fb106502e
Author: lihan <[email protected]>
AuthorDate: Mon Feb 27 16:29:31 2023 +0800
Fix a bug that memory allocation is larger than limit in SynchronizedStack
to reduce memory footprint.
---
java/org/apache/tomcat/util/collections/SynchronizedStack.java | 2 +-
webapps/docs/changelog.xml | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/util/collections/SynchronizedStack.java
b/java/org/apache/tomcat/util/collections/SynchronizedStack.java
index f178b02048..526c44cef5 100644
--- a/java/org/apache/tomcat/util/collections/SynchronizedStack.java
+++ b/java/org/apache/tomcat/util/collections/SynchronizedStack.java
@@ -52,7 +52,7 @@ public class SynchronizedStack<T> {
this.size = size;
}
this.limit = limit;
- stack = new Object[size];
+ stack = new Object[this.size];
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index da9612398f..27095f5b27 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -105,6 +105,14 @@
issues do not "pop up" wrt. others).
-->
<section name="Tomcat 8.5.87 (schultz)" rtext="in development">
+ <subsection name="General">
+ <changelog>
+ <fix>
+ Fix a bug that memory allocation is larger than limit in
+ <code>SynchronizedStack</code> to reduce memory footprint. (lihan)
+ </fix>
+ </changelog>
+ </subsection>
<subsection name="Catalina">
<changelog>
<update>
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]