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.

Reply via email to