[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: <michael_rytting_at_agilent.com>
Date: Mon, 22 Aug 2011 10:43:33 -0600

No luck, still crashing.

-----Original Message-----
From: Philip Martin [mailto:philip.martin_at_wandisco.com]
Sent: Monday, August 22, 2011 10:23 AM
To: RYTTING,MICHAEL (A-ColSprings,ex1)
Cc: markphip_at_gmail.com; dev_at_subversion.apache.org; users_at_subversion.apache.org
Subject: Re: Problems compiling 1.7.0 on redhat el4 64bit

<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:

https://issues.apache.org/bugzilla/show_bug.cgi?id=50731

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)
 {
 #if APR_HAS_THREADS
 #if APR_VERSION_AT_LEAST(1,3,0)
- return apr_atomic_xchgptr(mem, new_value);
+ return apr_atomic_xchgptr((volatile void **)mem, new_value);
 #else
    /* old APRs don't support atomic swaps. Simply return the
     * input to the caller for further proccessing. */

--
uberSVN: Apache Subversion Made Easy
http://www.uberSVN.com
Received on 2011-08-22 18:44:08 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.