test/rpc_client: fix buffer overflow in the test
pthread_join() expect pointer to 'void *' which is 8 byte long but gets
pointer to 'int' which is 4 byte long.
Bug introduced in:
e6c30818e3
("test: don't use bdev_svc application in this test")
Fixes #533
Change-Id: Icaa35c5acec5ad9aebfb92e05b113c4275624db4
Signed-off-by: Pawel Wodkowski <pawelx.wodkowski@intel.com>
Reviewed-on: https://review.gerrithub.io/436309
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
This commit is contained in:
parent
a207f575fb
commit
81c7ed6d07
@ -230,7 +230,7 @@ int main(int argc, char **argv)
|
||||
pthread_t srv_tid, client_tid;
|
||||
int srv_tid_valid;
|
||||
int client_tid_valid = -1;
|
||||
int th_rc = INT_MIN;
|
||||
intptr_t th_rc = INTPTR_MIN;
|
||||
int rc = 0, err_cnt = 0;
|
||||
|
||||
sem_init(&g_rpc_server_th_listening, 0, 0);
|
||||
@ -262,7 +262,7 @@ out:
|
||||
fprintf(stderr, "pthread_join() on cliennt thread failed (rc: %d)\n", rc);
|
||||
err_cnt++;
|
||||
} else if (th_rc) {
|
||||
fprintf(stderr, "cliennt thread failed reported failure(thread rc: %d)\n", th_rc);
|
||||
fprintf(stderr, "cliennt thread failed reported failure(thread rc: %d)\n", (int)th_rc);
|
||||
err_cnt++;
|
||||
}
|
||||
}
|
||||
@ -281,7 +281,7 @@ out:
|
||||
fprintf(stderr, "pthread_join() on cliennt thread failed (rc: %d)\n", rc);
|
||||
err_cnt++;
|
||||
} else if (th_rc) {
|
||||
fprintf(stderr, "cliennt thread failed reported failure(thread rc: %d)\n", th_rc);
|
||||
fprintf(stderr, "cliennt thread failed reported failure(thread rc: %d)\n", (int)th_rc);
|
||||
err_cnt++;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user