|
From: | Brent W. Baccala |
Subject: | Re: race condition in libports |
Date: | Fri, 5 Jan 2018 19:47:37 -0500 |
Hello,
Brent W. Baccala, on ven. 05 janv. 2018 17:45:57 -0500, wrote:
> I've "fixed" this by making sure we don't remove the hash table entry unless
> there are exactly two weak references outstanding, but I'm not sure that's the
> best way to handle it. It doesn't seem like the dropweak routine should have
> to be so careful; it shouldn't get called twice like that.
Well, AIUI from the documentation, dropweak should manage by itself how
many weak references it should drop. I.e. the number of times dropweak
is called doesn't matter, the first call should drop them, and later
calls should be fine that there aren't any to drop any more. So it seems
to me that your proposed fix is correct. I just rewrote it to make sure
to get coherent counts between hard and weak.
[Prev in Thread] | Current Thread | [Next in Thread] |