[haiku-bugs] Re: [Haiku] #13927: gpgme KDL's when test are enabled

  • From: "Haiku" <trac@xxxxxxxxxxxx>
  • To: undisclosed-recipients: ;
  • Date: Tue, 28 Jan 2020 04:10:30 -0000

#13927: gpgme KDL's when test are enabled
--------------------------------------+----------------------------
   Reporter:  Begasus                 |      Owner:  axeld
       Type:  bug                     |     Status:  new
   Priority:  normal                  |  Milestone:  Unscheduled
  Component:  Network & Internet/TCP  |    Version:  R1/Development
 Resolution:                          |   Keywords:
 Blocked By:                          |   Blocking:
Has a Patch:  0                       |   Platform:  All
--------------------------------------+----------------------------
Comment (by ambroff):

 I spent a bunch of time bringing [https://review.haiku-
 os.org/c/haiku/+/2165 BOpenHashTable under test] because I was convinced
 that changing it to handle duplicates was the right thing to do. But now
 that I've read through that code carefully I don't think that's the right
 thing to do, since it adds some non-trivial cost for other uses of that
 container where it isn't necessary.

 Looking back at EndpointManager::SetConnection(), I think that the main
 problem is here:

 {{{
 if (_LookupConnection(*local, peer) != NULL)
         return EADDRINUSE;

 endpoint->LocalAddress().SetTo(*local);
 endpoint->PeerAddress().SetTo(peer);
 T(Connect(endpoint));

 fConnectionHash.Insert(endpoint);
 return B_OK;
 }}}

 _LookupConnection should return non-null here, but it isn't for some
 reason. I think there may be a mistake in this method that's causing it to
 query for an endpoint that is not quite equal to the one being inserted
 just below that check.
-- 
Ticket URL: <https://dev.haiku-os.org/ticket/13927#comment:13>
Haiku <https://dev.haiku-os.org>
The Haiku operating system.

Other related posts: