Hi.  I've discovered a nasty bug in glibc 2.1: arguments to
strcmp() (and possibly other functions) are evaluated more than once:

$ cat kk.c
#include <stdio.h>
#include <string.h>

static char * kk(void)
{
        printf("Got here!\n");
        return "yeah";
}

main()
{
        strcmp(kk(), "yeah");
}
$ gcc -O2 -o kk kk.c
$ ./kk
Got here!
Got here!
Got here!
$ _

-- 
Juan Cespedes


--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
[EMAIL PROTECTED] . 
Trouble?  e-mail to [EMAIL PROTECTED] .

Reply via email to