On (14/01/09 17:07), Natanael Copa wrote:
> Hi,
> 
> This test program segfaults for me on x86, hardened gcc-4.3.2 and
> uclibc-0.9.30:
> 
> #include <stdio.h>
> #include <ctype.h>
> int main(void) {
>       printf("%i\n", isalnum(0x10000));
>       return 0;
> }
> 
> 
> If the ctype.h include is commented out it works as expected.
> 

Well on a different note C99 standard says that for character
manipulating functions defined in
ctype.h argument is an int but this shall be representable as an
unsigned char or EOF any other value results in undefined behavior.

therefore I think we are ok here the above case falls into undefined
behavior category.

> -nc
> 
> _______________________________________________
> uClibc mailing list
> [email protected]
> http://lists.busybox.net/mailman/listinfo/uclibc
_______________________________________________
uClibc mailing list
[email protected]
http://lists.busybox.net/mailman/listinfo/uclibc

Reply via email to