This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/main by this push:
new f996abe65a Revert "Fix consistent crash (on Unix with OpenSSL
provider) in tests"
f996abe65a is described below
commit f996abe65adfbf39e0bee1b89eaefa74d56d0a04
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Oct 30 19:06:09 2025 +0000
Revert "Fix consistent crash (on Unix with OpenSSL provider) in tests"
This reverts commit f3b7bdc30176acc6fd5a98c075fedf60232454b2.
---
.../tomcat/util/net/openssl/OpenSSLContext.java | 32 +++++-----------------
1 file changed, 7 insertions(+), 25 deletions(-)
diff --git a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
index 15a734470a..65dd146396 100644
--- a/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
+++ b/java/org/apache/tomcat/util/net/openssl/OpenSSLContext.java
@@ -584,40 +584,22 @@ public class OpenSSLContext implements
org.apache.tomcat.util.net.SSLContext {
}
- private class OpenSSLState implements Runnable {
- private volatile long aprPool;
- private volatile long cctx;
- private volatile long ctx;
-
- /**
- * @param aprPool the APR pool
- * @param cctx OpenSSLConfCmd context
- * @param ctx SSL context
- */
- OpenSSLState(long aprPool, long cctx, long ctx) {
- this.aprPool = aprPool;
- this.cctx = cctx;
- this.ctx = ctx;
- }
-
- /*
- * This runnable can be called by the cleaner thread during GC but
also by OpenSSLContext.destroy() so we need
- * to make sure that the free() methods are only called once. Calling
them more than once will trigger a JVM
- * crash.
- */
+ /**
+ * @param aprPool the APR pool
+ * @param cctx OpenSSLConfCmd context
+ * @param ctx SSL context
+ */
+ private record OpenSSLState(long aprPool, long cctx, long ctx) implements
Runnable {
@Override
- public synchronized void run() {
+ public void run() {
if (ctx != 0) {
SSLContext.free(ctx);
- ctx = 0;
}
if (cctx != 0) {
SSLConf.free(cctx);
- cctx = 0;
}
if (aprPool != 0) {
Pool.destroy(aprPool);
- aprPool = 0;
}
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]