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

Re: svn status freezes in working copies with unusual file names

From: Malcolm Rowe <malcolm-svn-dev_at_farside.org.uk>
Date: 2007-02-24 06:26:16 CET

On Fri, Feb 23, 2007 at 08:23:50PM -0800, Vlad Skvortsov wrote:
> Malcolm Rowe wrote:
> >>After issuing the 'status' command svn gets busy, taking almost 100% of
> >>CPU.
> >
> >I can't reproduce this on trunk. What's your LANG and related settings?
> >(the output of 'locale').
>
> LANG=ru_RU.KOI8-R

Okay, I can reproduce this now. It looks like there's a bug in
libsvn_subr/utf.c:convert_to_stringbuf(). The source character \x8b
will convert (at least according to my apr_xlate_conv_buffer()) to the
UTF-8 sequence \xe2 \x96 \x80 (U+2580 UPPER HALF BLOCK).

We pass apr_xlate_conv_buffer() the source string, source length (1),
and a destination buffer of length 2. Unfortunately, this isn't long
enough to encode the output, so APR just does nothing.

The problem is that we use (destlen == 0) to determine when to increase
the size of the buffer, but that doesn't help: there are some cases
(like this) where we can have some spare destination buffer, but not
enough to encode the next character. We should probably identify
this problem (i.e. no error, but there are the same number of source
characters remaining, or something similar), and then boost the destbuf
by some amount.

(Anyone see a straightforward way to achieve that?)

Actually, I'm surprised we don't see this more often.

Regards,
Malcolm

  • application/pgp-signature attachment: stored
Received on Sat Feb 24 06:26:37 2007

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