[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: Mattias Engdegård <mattiase_at_bredband.net>
Date: Sat, 20 Apr 2013 12:54:45 +0200

20 apr 2013 kl. 12.27 skrev Stefan Sperling:

>> 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
> builds?

Sorry about barging in like this, but isn't this just a case of
calling ctype functions/macros with a char argument, where char is
signed by default? It's prohibited by the standard, although glibc is
"nice" enough to allow values in the [-128, 255] range just because
this mistake is so common.

Looking at apr_fnmatch.c, it indeed seems like that is what is going on.

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

That is not how the C standard works. When a library call is used with
arguments for which its behaviour is not defined, this results in
undefined behaviour.
Received on 2013-04-20 12:55:21 CEST

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