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

Re: log --search test failures on trunk and 1.8.x

From: Stefan Sperling <stsp_at_apache.org>
Date: Sat, 20 Apr 2013 12:27:42 +0200

On Tue, Apr 16, 2013 at 02:15:17PM +0400, Ivan Zhakov wrote:
> Hi,
> I got following failures when running Debug build with VC 2010:
> FAIL: log_tests.py 40: test 'svn log -g --search'
> FAIL: log_tests.py 39: 'svn log --search'
> They fail because of assertion in VC runtime:
> [[[
> W: f:\dd\vctools\crt_bld\self_x86\crt\src\isctype.c(68) : Assertion
> failed: (unsigned)(c + 1) <= 256
> ]]]

Seems like a bogus check to me. Is there a notion of debug vs. release
builds in Visual Studio, and if so, does this happen in release mode

tolower() is supposed to return the byte unchanged in case it cannot
be converted to a lower-case representation. I would expect that
to happen in your case.

See http://pubs.opengroup.org/onlinepubs/9699919799/functions/tolower.html
It doesn't say "fail if the value overflows".

> This happens because apr_fnmatch does not handle UTF8 character and
> pass UTF lead char to tolower() call. There is already XXX comment in
> apr\strings\apr_fnmatch.c:121

Yes, apr_fnmatch() doesn't support multi-byte characters yet.
And it never has. But the fnmatch implementation was changed
in APR-1.4.5, so it is possible that this problem didn't trigger
with the old implementation.

> Easy solution could be use apr_fnmatch without APR_FNM_CASE_BLIND and
> make svn --search case-sensitive. Alternative solution is convert
> search pattern and search string to lower case before passing to
> apr_fnmatch.

How is lower-casing a multi-byte UTF-8 character going to help?
Won't the lower-case equivalent still be a multibyte character
and trigger the overflow check in Visual Studio?

> And third option is to fix apr_fnmatch().

I'd very much like to do that, actually. Just have to find time.
Received on 2013-04-20 12:28:19 CEST

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