Thanks a lot. Was just to make sure.
> Am 18.04.2019 um 18:32 schrieb Andreas Wacknitz <[email protected]>: > >> Am 18.04.19 um 17:55 schrieb Rouven WEILER: >> is the following patch included in the actual oi codebase and since when? >> >> https://www.illumos.org/issues/9959 >> >> >> _______________________________________________ >> oi-dev mailing list >> [email protected] >> https://openindiana.org/mailman/listinfo/oi-dev > Obviously, you can see the commit id. With this you can run > git show 6da2547363ddbd247ee9513db83b05a31bca31af > > commit 6da2547363ddbd247ee9513db83b05a31bca31af > Author: Richard Lowe <[email protected]> > Date: Tue Nov 6 00:57:32 2018 +0000 > > 9959 pthread_mutex_init should initialize mutex appropriately for robust > mutex_init > Reviewed by: Jason King <[email protected]> > Reviewed by: Robert Mustacchi <[email protected]> > Approved by: Dan McDonald <[email protected]> > > diff --git a/usr/src/lib/libc/port/threads/pthr_mutex.c > b/usr/src/lib/libc/port/threads/pthr_mutex.c > index 1f70725677..c8943671aa 100644 > --- a/usr/src/lib/libc/port/threads/pthr_mutex.c > +++ b/usr/src/lib/libc/port/threads/pthr_mutex.c > @@ -226,6 +226,23 @@ pthread_mutex_init(pthread_mutex_t *_RESTRICT_KYWD mutex, > PTHREAD_PRIO_NONE | PTHREAD_MUTEX_STALLED; > } > > + /* > + * POSIX mutexes (this interface) make no guarantee about the state of > + * the mutex before pthread_mutex_init(3C) is called. Sun mutexes, > upon > + * which these are built and which mutex_init(3C) below represents > + * require that a robust mutex be initialized to all 0s _prior_ to > + * mutex_init() being called, and that mutex_init() of an initialized > + * mutex return EBUSY. > + * > + * We respect both these behaviors by zeroing the mutex here in the > + * POSIX implementation if and only if the mutex magic is incorrect, > + * and the mutex is robust. > + */ > + if (((type & PTHREAD_MUTEX_ROBUST) != 0) && > + (((mutex_t *)mutex)->mutex_magic != MUTEX_MAGIC)) { > + (void) memset(mutex, 0, sizeof (*mutex)); > + } > + > return (mutex_init((mutex_t *)mutex, type, &prioceiling)); > } > > > So if you run pkg update on OI after Nov 6th, 2018, you should have it :) > > Regards > _______________________________________________ > oi-dev mailing list > [email protected] > https://openindiana.org/mailman/listinfo/oi-dev
_______________________________________________ oi-dev mailing list [email protected] https://openindiana.org/mailman/listinfo/oi-dev
