Skip to content
Tcl Source Code History Of Ticket 91466985995db6b5
Login

History Of Ticket 91466985995db6b5

Artifacts Associated With Ticket 91466985995db6b5

  1. Ticket change [5fb0df8e65] (rid 143798) by emiliano on 2015-11-01 21:35:28:

    1. assignee initialized to: "nobody"
    2. closer initialized to: "nobody"
    3. cmimetype initialized to: "text/plain"
    4. comment initialized to:
      On NetBSD, gethostbyname_r is detected but the function is incompatible
      with Tcl usage, so at least on NetBSD-7 [info hostname] crashes.
      Attached patch solves the issue.
      
    5. foundin initialized to: "trunk"
    6. is_private initialized to: "0"
    7. login: "emiliano"
    8. priority initialized to: "5 Medium"
    9. private_contact initialized to: "885ae311f5fce05c2a8d9c31d2d2a1b5638ca9df"
    10. resolution initialized to: "None"
    11. severity initialized to: "Critical"
    12. status initialized to: "Open"
    13. submitter initialized to: "emiliano"
    14. subsystem initialized to: "- New Builtin Commands"
    15. title initialized to:
      NetBSD's gethostbyname_r() incompatible with Tcl usage
      
    16. type initialized to: "Bug"
  2. Add attachment "nbsd_gethostbyname.diff" [438f049396] (rid 143799) by emiliano on 2015-11-01 21:35:58.

  3. Ticket change [090628fbc9] (rid 143810) by emiliano on 2015-11-02 11:29:23:

    1. login: "emiliano"
    2. mimetype: "text/plain"
    3. subsystem changed to: "52. Portability Support"
  4. Ticket change [08d2659275] (rid 147583) by emiliano on 2016-07-07 12:57:36:

    1. icomment:
      More evidence that gethostbyname_r() is unsupported on NetBSD:
      
      http://mail-index.netbsd.org/netbsd-users/2016/06/30/msg018651.html
      
    2. login: "emiliano"
    3. mimetype: "text/plain"
  5. Ticket change [4281739fd0] (rid 147724) by dkf on 2016-07-09 08:37:26:

    1. icomment:
      Is there a reason for that platform not using getaddrinfo()?
      
    2. login: "dkf"
    3. mimetype: "text/plain"
  6. Ticket change [b673e41064] (rid 147725) by dkf on 2016-07-09 08:40:30:

    1. icomment:
      By which I mean "why don't we switch to using getaddrinfo() there as well as for actually creating sockets?" After all, we've already got the machinery largely there in tclIOSock.c...
      
    2. login: "dkf"
    3. mimetype: "text/html"
    4. username: "dkf"
  7. Ticket change [0e4f2e16ef] (rid 148195) by gustafn2 on 2016-07-21 12:13:57:

    1. icomment:
      my 5ct: i would think that in cases, where HAVE_GETADDRINFO is defined, one should use getaddrinfo() instead of gethostbyname*(). If there are really systems in use, which do not HAVE_GETADDRINFO, these can fallback to the GETHOSTBYNAME machinery.
      
    2. login: "gustafn2"
    3. mimetype: "text/plain"
  8. Ticket change [ab5d7a06ad] (rid 148196) by gustafn2 on 2016-07-21 12:20:09:

    1. icomment:
      ... we do this in NaviServer, see e.g. <a href="https://bitbucket.org/naviserver/naviserver/src/5f7cd4c8661884156c5d5a0af65ecc3b09485d54/nsd/dns.c?at=default&fileviewer=file-view-default#dns.c-372">bitbucket/naviserver/nsd/dns.c#372</a>
      
    2. login: "gustafn2"
    3. mimetype: "text/html"
  9. Add attachment "tcl86-gethostbyaddr.patch" [a793c53f80] (rid 148258) by gustafn2 on 2016-07-26 10:04:14.

  10. Ticket change [bd24831039] (rid 148261) by gustafn2 on 2016-07-26 10:13:03:

    1. icomment:
      I've added a patch replacing all occurrences of gethostbyname_r() by an appropriate call of getaddrinfo(). Actually, the definition of TclpGetHostByName() could/should be dropped, when HAVE_GETADDRINFO is defined (i am not sure, what the policy in tcl-core concerning Tclp* calls is). I would recommend to drop TclpGetHostByName(), since this returns a partial struct hostent, which makes mostly sense in connection with gethostbyname*().
      
    2. login: "gustafn2"
    3. mimetype: "text/plain"
  11. Ticket change [7764c10e05] (rid 153998) by emiliano on 2017-05-29 15:30:34:

    1. icomment:
      From a fresh update of Tcl trunk (2017-05-29), compiled with default options:
      
      % info hostname
      cabernet.vinotinto.com.ar
      % info patchlevel
      8.7a0
      % uname -a
      NetBSD cabernet.vinotinto.com.ar 7.1 NetBSD 7.1 (GENERIC.201703111743Z) i386
      
      So this ticket can be closed.
      
      The issue of using non-standard interfaces (gethostbyname_r) when a standard one can be used (getaddrinfo) should be addressed to avoid reintroducing these type of
      bugs
      
    2. login: "emiliano"
    3. mimetype: "text/plain"
  12. Ticket change [44c50ea2c9] (rid 175638) by krytarowski on 2019-10-02 13:40:40:

    1. closedate changed to: "2458759.06990988"
    2. closer changed to: "krytarowski"
    3. icomment:
      Fixed with https://core.tcl-lang.org/tcl/info/16768d65f0
      
    4. login: "krytarowski"
    5. mimetype: "text/plain"
    6. status changed to: "Closed"