[PATCH] lib: Fix CID 1338432 Unchecked return value

Andrew Bartlett abartlet at samba.org
Tue Nov 10 17:45:51 UTC 2015


On Tue, 2015-11-10 at 09:27 -0800, Jeremy Allison wrote:
> On Tue, Nov 10, 2015 at 10:36:38AM +0100, Volker Lendecke wrote:
> > On Tue, Nov 10, 2015 at 11:29:41AM +0200, Uri Simchoni wrote:
> > > On 11/10/2015 11:20 AM, Ralph Boehme wrote:
> > > > On Tue, Nov 10, 2015 at 10:01:02AM +0100, Volker Lendecke
> > > > wrote:
> > > > > Review&push appreciated!
> > > > pushed.
> > > > 
> > > > -Ralph
> > > > 
> > > What about printing a decent error message if it does happen?
> > > (for
> > > example, someone stomps over the pool object, causing a call to
> > > pthread_join with garbage thread id)
> > > 
> > > I can see the pthreadpool code currently does not include
> > > debug.h,
> > > maybe for dependency reasons, but IMHO you want an error message
> > > printed when a system call fails unexpectedly.
> > 
> > Ok, we better leave this unpatched. I don't want to touch
> > anything like DEBUG or even printf or syslog in anything
> > that even from a distance touches threads.
> > 
> > Sorry for the noise, Volker
> 
> No, *not* better to leave this unpatched. abort()
> here is the correct decision.

One of the nice things about abort() is that it will trigger the
backtrace handler etc, which is essentially ideal for describing this
kind of error, and that handler can and does trigger DEBUG().

Andrew Bartlett

-- 
Andrew Bartlett                       http://samba.org/~abartlet/
Authentication Developer, Samba Team  http://samba.org
Samba Developer, Catalyst IT          http://catalyst.net.nz/services/samba






More information about the samba-technical mailing list