Discussion:
create socket error: Address family not supported by protocol(errno: 97)
lyc364
2013-10-10 12:22:13 UTC
Permalink
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

Loading...