[klee-dev] create socket error: Address family not supported by protocol(errno: 97)

lyc364 lyc364 at gmail.com
Thu Oct 10 13:22:13 BST 2013


Hi everyone,
    I went in to error like 'create socket error: Address family not supported by protocol(errno: 97)' while using KLEE run following socket program:


#define MAXLINE 4096


int main(int argc, char** argv)
{ 
    int listenfd, connfd; 
    struct sockaddr_in servaddr; 
    char buff[4096]; 
    klee_make_symbolic(buff, 4096, "buff");
    int n; 
    if( (listenfd = socket(AF_INET, SOCK_STREAM, 0)) == -1 )
    { 
        printf("create socket error: %s(errno: %d)\n",strerror(errno),errno); 
        exit(0);
    } 
    /* Unrelated code omitted */ 
}


My command was:  klee --libc=uclibc --posix-runtime server.bc. 


It seemes that something was wrong when KLEE tried to call socket function defined in uclibc but I am not sure.


It will be appreciated if anyone of you can help.
Cheers,
Ben Li
-------------- next part --------------
HTML attachment scrubbed and removed


More information about the klee-dev mailing list