subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
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

URL: http://svn.apache.org/viewvc?rev=1782614&view=rev
Log:
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

Modified: subversion/trunk/subversion/libsvn_repos/authz.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_repos/authz.c?rev=1782614&r1=1782613&r2=1782614&view=diff
==============================================================================
--- 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)
 {
 #if APR_HAS_THREADS
-  svn_boolean_t multi_threaded
-    = apr_allocator_mutex_get(apr_pool_allocator_get(pool)) != NULL;
+  svn_boolean_t multi_threaded = TRUE;
 #else
   svn_boolean_t multi_threaded = FALSE;
 #endif



Mime
View raw message