ASF Bugzilla – Attachment 34005 Details for
Bug 59797
Per thread error hash grows indefinitely
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch to expose the thread cleaning method
tc-native-expose-err-clear.patch (text/plain), 1.60 KB, created by
Mark Thomas
on 2016-07-04 19:55:28 UTC
(
hide
)
Description:
Patch to expose the thread cleaning method
Filename:
MIME Type:
Creator:
Mark Thomas
Created:
2016-07-04 19:55:28 UTC
Size:
1.60 KB
patch
obsolete
>diff --git a/native/src/ssl.c b/native/src/ssl.c >index ded7b22..5875a68 100644 >--- a/native/src/ssl.c >+++ b/native/src/ssl.c >@@ -272,6 +272,14 @@ TCN_IMPLEMENT_CALL(jstring, SSL, >versionString)(TCN_STDARGS) > return AJP_TO_JSTRING(OPENSSL_VERSION_TEXT); > } > >+static void ssl_err_remove(void) { >+#if (OPENSSL_VERSION_NUMBER < 0x10000000L) || defined(OPENSSL_USE_DEPRECATED) >+ ERR_remove_state(0); >+#elif (OPENSSL_VERSION_NUMBER < 0x10100000L) >+ ERR_remove_thread_state(NULL); >+#endif >+} >+ > /* > * the various processing hooks > */ >@@ -310,11 +318,7 @@ static apr_status_t ssl_init_cleanup(void *data) > #if OPENSSL_VERSION_NUMBER >= 0x00907001 > CRYPTO_cleanup_all_ex_data(); > #endif >-#if (OPENSSL_VERSION_NUMBER < 0x10100000L) || defined(OPENSSL_USE_DEPRECATED) >- ERR_remove_state(0); >-#else >- ERR_remove_thread_state(NULL); >-#endif >+ ssl_err_remove(); > > /* Don't call ERR_free_strings here; ERR_load_*_strings only > * actually load the error strings once per process due to static >@@ -1105,6 +1109,11 @@ TCN_IMPLEMENT_CALL(jboolean, SSL, >hasOp)(TCN_STDARGS, jint op) > return op == (op & supported_ssl_opts) ? JNI_TRUE : JNI_FALSE; > } > >+TCN_IMPLEMENT_CALL(void, SSL, threadCleanup)(TCN_STDARGS) { >+ UNREFERENCED(o); >+ ssl_err_remove(); >+} >+ > #else > /* OpenSSL is not supported. > * Create empty stubs. >@@ -1231,4 +1240,9 @@ TCN_IMPLEMENT_CALL(jboolean, SSL, >hasOp)(TCN_STDARGS, jint op) > UNREFERENCED(op); > return JNI_FALSE; > } >+ >+TCN_IMPLEMENT_CALL(void, SSL, threadCleanup)(TCN_STDARGS) { >+ UNREFERENCED_STDARGS; >+} >+ > #endif
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 59797
: 34005 |
34006
|
34007
|
34597
|
34686