[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Problems compiling 1.7.0 on redhat el4 64bit

From: Philip Martin <philip.martin_at_wandisco.com>
Date: Mon, 22 Aug 2011 17:23:11 +0100

<michael_rytting_at_agilent.com> writes:

> It is set to 1
>> Looking at the rest of the stack trace I would say this is the first
>> call to a utf8 conversion function that would have invoked
>> get_xlate_handle_node and I suspect it is that function that is going
>> wrong. At a guess something to do with the use of atomic_swap, which
>> makes it important to confirm the value of APR_HAS_THREADS.

I wonder if it is connected to this APR bug:


In subversion/libsvn_subr/utf.c we declare

static volatile void *xlat_ntou_static_handle = NULL;
static volatile void *xlat_uton_static_handle = NULL;

that is "pointers to volatile data", as required by APR, but we really
want "volatile pointers to data". Perhaps we should do something
similar to svn_cache_config.c. Would you try this patch built with
optimisations enabled:

Index: subversion/libsvn_subr/utf.c
--- subversion/libsvn_subr/utf.c (revision 1160136)
+++ subversion/libsvn_subr/utf.c (working copy)
@@ -90,8 +90,8 @@
  * using atomic xchange ops, i.e. without further thread synchronization.
  * If the respective item is NULL, fallback to hash lookup.
-static volatile void *xlat_ntou_static_handle = NULL;
-static volatile void *xlat_uton_static_handle = NULL;
+static void * volatile xlat_ntou_static_handle = NULL;
+static void * volatile xlat_uton_static_handle = NULL;
 /* Clean up the xlate handle cache. */
 static apr_status_t
@@ -182,11 +182,11 @@
  * the caller.
 static APR_INLINE void*
-atomic_swap(volatile void **mem, void *new_value)
+atomic_swap(void * volatile * mem, void *new_value)
- return apr_atomic_xchgptr(mem, new_value);
+ return apr_atomic_xchgptr((volatile void **)mem, new_value);
    /* old APRs don't support atomic swaps. Simply return the
     * input to the caller for further proccessing. */

uberSVN: Apache Subversion Made Easy
Received on 2011-08-22 18:23:46 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.