[PATCH] libwbclient clear pointer on bad read
jra at samba.org
Thu Jan 15 15:21:08 MST 2015
On Thu, Jan 15, 2015 at 09:52:24PM +0000, Matthew Newton wrote:
> On Thu, Jan 15, 2015 at 12:44:15PM -0800, Jeremy Allison wrote:
> > On Thu, Jan 15, 2015 at 09:42:36PM +0100, Volker Lendecke wrote:
> > > Yep, sorry for that. I'd think that pthreads will be
> > > supported for quite a long time on all the platforms we're
> > > interested in. It's gonna be a while before it's replaced by
> > > some native C11 successor threading.
> > Yep, pthreads have won the war. If I get some time
> > I'll redo the thing in terms of the standard interfaces.
> I saw that, but couldn't find any examples of how to use it, and I
> guess your e-mails just confimed why!
> I'm happy to try and work out how to use the abstraction layer if
> you'd prefer, though I think you're right that nowadays everyone
> basically uses pthreads anyway so it's probably safe to just go
No, I don't want to add more users of it - it was
designed to be used in a similar way to how openssl
handles different underlying thread models, but there
are no different underlying thread models any more :-).
The only good thing about it is it allows calls to
tls functions and mutex functions without having
to wrap everything inside ugly #if defined(HAVE_PTHREADS)
#endif preprocessor macros, but that's the way it got
done inside other areas of Samba, so we have to live
with it :-).
> Is threading used much in Samba? I couldn't find any good examples
> anywhere, but maybe I didn't grep hard enough.
Actually the core engine for read and write inside
smbd is fully threaded, but it hides inside Volkers
pthreadpool abstraction, which is a *seriously* nice
More information about the samba-technical