|
Message-ID: <20201028201815.GI534@brightrain.aerifal.cx> Date: Wed, 28 Oct 2020 16:18:16 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: bug: sem_close always unmaps semaphore regardless of ref count On Wed, Oct 28, 2020 at 04:11:05PM -0400, Rich Felker wrote: > I found this while reading the code during review of lock usage for > MT-fork. Test case attached (can be adapted for libc-test regression > tests, I think, or improved to be a conformance test). > > Rich > #include <semaphore.h> > > int main() > { > char buf[] = "mysemXXXXXX"; > if (!mktemp(buf)) return 1; > sem_t *sem = sem_open(buf, O_CREAT|O_EXCL, 0600); > sem_open(buf, 0); > sem_unlink(buf); > sem_close(sem); > sem_post(sem); > } Fixed in f70375df85d26235a45e74559afd69be59e5ff99.
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.