bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fork() loses when thread self port's refcount is max'ed out


From: Roland McGrath
Subject: Re: fork() loses when thread self port's refcount is max'ed out
Date: Sat, 12 Oct 2002 22:46:33 -0400 (EDT)

> > pthread just seem to trigger it by calling mach_thread_self often.
> 
> As a side note, libpthread may call it a lot but only in asserts

So you have asserts that have the side effect of leaking send rights?
That's a) buggy because it leaks and b) not very good at having the code
with assertions testing the same run-time circumstances that the code will
have with -DNDEBUG.  e.g. if you had a bug that failed to keep the send
right in a data structure live for some thread (including as a dead name so
as to continue distinguishing it from a new live thread that might reuse
the port name), you would never notice because the leaked rights in the
asserts would mask it.






reply via email to

[Prev in Thread] Current Thread [Next in Thread]