[PATCHES][BUG 13170] Fix crash in pthreadpool thread after failure from pthread_create
Andreas Schneider
asn at samba.org
Wed Dec 6 20:47:10 UTC 2017
On Wednesday, 6 December 2017 21:42:54 CET Christof Schmitt wrote:
> On Wed, Dec 06, 2017 at 09:38:02PM +0100, Andreas Schneider wrote:
> > > If we decide to go with cmocka anyway, the best approach would be to put
> > > the new test in a new file and implement it completely with cmocka.
> > > Existing tests could then be converted later.
> >
> > I thought that we would go that way for master. Just write that one test
> > using cmocka. We could do the backport without the test for Samba 4.6,
> > Samba 4.7 includes cmocka in third_party.
>
> Ok, let me work on this approach then.
>
> > If we want to use cmocka for every test we need to provide a way for
> > mutexes without linking cmocka to a threading library. cmocka only
> > requires libc and it should stay that way. However we could create it in
> > such a way that you can set functions for locking which called at the
> > right positions in cmocka.
> I am not sure what you mean here. pthreadpool uses mutexes and threads
> internally and links against pthreads. Is that a problem for cmocka?
Normally not. But in case there is an issue we have:
CMOCKA_TEST_ABORT=1 ./mytest
For debugging.
--
Andreas Schneider GPG-ID: CC014E3D
Samba Team asn at samba.org
www.samba.org
More information about the samba-technical
mailing list