ibm-capi/pslse

An improper locking bug(e.g., deadlock) on the lock

Closed this issue · 2 comments

Hi, developers, thank you for your checking. It seems the lock lock is not released correctly when psl_list == NULL and (listen_fd = _start_server()) < 0?

pslse/pslse/pslse.c

Lines 580 to 594 in 9084b98

pthread_mutex_lock(&lock);
shim_host_path = getenv("SHIM_HOST_DAT");
if (!shim_host_path) shim_host_path = "shim_host.dat";
afu_map = parse_host_data(&psl_list, parms, shim_host_path, &lock, fp);
if (psl_list == NULL) {
free(parms);
fclose(fp);
warn_msg("Unable to connect to any simulators");
return -1;
}
// Start server
if ((listen_fd = _start_server()) < 0) {
free(parms);
fclose(fp);
return -1;

Best,

correction #120 merged

Thank you very much.