ASF Bugzilla – Attachment 24312 Details for
Bug 47843
Non-threadsafe use of memory pool by apr_thread_pool_create() and thread_pool_func()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Lock thread pool mutex around the call to apr_thread_create
thread_pool.diff (text/plain), 823 bytes, created by
Alex Korobka
on 2009-09-25 09:42:44 UTC
(
hide
)
Description:
Lock thread pool mutex around the call to apr_thread_create
Filename:
MIME Type:
Creator:
Alex Korobka
Created:
2009-09-25 09:42:44 UTC
Size:
823 bytes
patch
obsolete
>diff -urbp apr-util-1.3.9/misc/apr_thread_pool.c apr-util-new/misc/apr_thread_pool.c >--- apr-util-1.3.9/misc/apr_thread_pool.c 2009-09-15 15:48:28.000000000 -0400 >+++ apr-util-new/misc/apr_thread_pool.c 2009-09-25 08:42:12.000000000 -0400 >@@ -379,7 +379,12 @@ APU_DECLARE(apr_status_t) apr_thread_poo > apr_pool_cleanup_null); > > while (init_threads) { >+ /* Grab the mutex as apr_thread_create() and thread_pool_func() will >+ * allocate from (*me)->pool. This is dangerous if there are multiple >+ * initial threads to create. */ >+ apr_thread_mutex_lock((*me)->lock); > rv = apr_thread_create(&t, NULL, thread_pool_func, *me, (*me)->pool); >+ apr_thread_mutex_unlock((*me)->lock); > if (APR_SUCCESS != rv) { > break; > }
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 47843
: 24312