Date: Fri, 27 Mar 2020 14:16:54 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Cc: Leonid Shamis <leonid.shamis@...il.com> Subject: Re: __pthread_mutex_unlock uninitialized value On Fri, Mar 27, 2020 at 10:52:58AM -0700, Leonid Shamis wrote: > https://github.com/bminor/musl/blob/54ca677983d47529bab8752315ac1a2b49888870/src/thread/pthread_mutex_unlock.c#L34 BTW official git is here: https://git.musl-libc.org/cgit/musl/tree/src/thread/pthread_mutex_unlock.c?id=v1.2.0 > In the case where a mutex: > is one of PTHREAD_MUTEX_ERRORCHECK or PTHREAD_MUTEX_RECURSIVE > and PTHREAD_PRIO_INHERIT > > an uninitialized value of 'old' is used to check whether to futex. Can you elaborate on this? In line 15, old is assigned; this applies to all mutex types except plain boring normal (without PI and without robust). The condition in line 33 can only be true if type is nonzero (not plain boring normal mutex) so I don't see any way it can be used uninitialized in line 34. Is your report based on your own reading or a static analysis tool? Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.