subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject svn commit: r1782614 - /subversion/trunk/subversion/libsvn_repos/authz.c
Date Sat, 11 Feb 2017 16:07:07 GMT
Author: stsp
Date: Sat Feb 11 16:07:06 2017
New Revision: 1782614

Fix a crash during init in libsvn_repos with pool debugging enabled.

* subversion/libsvn_repos/authz.c
  (synchronized_authz_initialize): With APR_POOL_DEBUG, the function
   apr_pool_allocator_get() will return NULL (there is no global allocator).
   So dereferencing that pointer to find the allocator's mutex will segfault.
   It is unclear to me if using apr_allocator_mutex_get() is a sane way to find
   out if we're running in multithreaded mode, and I can't find a better way
   right now. For now, just assume that we're multithreaded if APR has threads.
   This should be safe and allows me to run the tests over DAV again.


Modified: subversion/trunk/subversion/libsvn_repos/authz.c
--- subversion/trunk/subversion/libsvn_repos/authz.c (original)
+++ subversion/trunk/subversion/libsvn_repos/authz.c Sat Feb 11 16:07:06 2017
@@ -135,8 +135,7 @@ static svn_error_t *
 synchronized_authz_initialize(void *baton, apr_pool_t *pool)
-  svn_boolean_t multi_threaded
-    = apr_allocator_mutex_get(apr_pool_allocator_get(pool)) != NULL;
+  svn_boolean_t multi_threaded = TRUE;
   svn_boolean_t multi_threaded = FALSE;

View raw message