This is an automated email from the ASF dual-hosted git repository.
lihan pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 9b02ef12d9 Fix a bug that memory allocation is larger than limit in
SynchronizedStack to reduce memory footprint.
9b02ef12d9 is described below
commit 9b02ef12d9507716228cf7df9e7b3e568d76d1b8
Author: lihan <[email protected]>
AuthorDate: Mon Feb 27 16:28:33 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 ff565d2628..96c55f827a 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 9.0.73 (remm)" 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]