[Bug 212122] getaddrinfo doesn't implement sort rule 10 deterministically

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Aug 24 20:04:38 UTC 2016


            Bug ID: 212122
           Summary: getaddrinfo doesn't implement sort rule 10
           Product: Base System
           Version: CURRENT
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Many People
          Priority: ---
         Component: bin
          Assignee: freebsd-bugs at FreeBSD.org
          Reporter: Herbie.Robinson at stratus.com

The formal behavior of qsort is unstable with regard to objects that are equal.
 Unfortunately, the standard requires that otherwise equal objects remain in
the order supplied by the DNS server.  The present code attempts to deal with
this by returning -1 for objects that are equal (i.e., returns that the first
parameter is less then the second parameter).  Unfortunately, the qsort API
does not state that the first parameter passed in is in any particular position
in the list.

Assuming I can get it uploaded, the patch I have for it will be against
Revision 304034.

Again, while this affects a lot or people, I don't think many will notice. 
It's been this way for years and I only just noticed...

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list