You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
In the ipc_dialer_dial implementation in src/platform/posix/posix_ipcdial.c, if nni_posix_pfd_init fails then goto error is executed, and nni_mtx_unlock(&d->mtx) is called without the mutex having been locked. this passes through to a pthread_mutex_unlock call, which is documented as having undefined behavior if the mutex is not locked.
One note for anyone looking at this -- short of running of out RAM, it's exceedingly unlikely that you've observed this particular bug. The failure path here should really not be one we expect to see executed.
Describe the bug
In the
ipc_dialer_dial
implementation insrc/platform/posix/posix_ipcdial.c
, ifnni_posix_pfd_init
fails thengoto error
is executed, andnni_mtx_unlock(&d->mtx)
is called without the mutex having been locked. this passes through to apthread_mutex_unlock
call, which is documented as having undefined behavior if the mutex is not locked.nng/src/platform/posix/posix_ipcdial.c
Lines 190 to 191 in c5e9d8a
It looks like this was introduced by PR #1111.
To Reproduce
This was found via code inspection.
** Environment Details **
The text was updated successfully, but these errors were encountered: