bin/182360: nslookup emits SIGSEGV when Ctrl-D (EOF) pressed

Xin Li delphij at
Mon Sep 30 19:31:43 UTC 2013

Hash: SHA512

On 09/29/13 18:44, Jeremy Chadwick wrote:
> On Wed, Sep 25, 2013 at 08:42:25PM +0000, delphij at
> wrote:
>> Synopsis: nslookup emits SIGSEGV when Ctrl-D (EOF) pressed
>> State-Changed-From-To: open->patched State-Changed-By: delphij 
>> State-Changed-When: Wed Sep 25 20:41:38 UTC 2013 
>> State-Changed-Why: Fixed in -HEAD, MFC reminder.
>> (Note that it's too late to fix this for 9.2-RELEASE).
>> Responsible-Changed-From-To: freebsd-bugs->delphij 
>> Responsible-Changed-By: delphij Responsible-Changed-When: Wed Sep
>> 25 20:41:38 UTC 2013 Responsible-Changed-Why: Take.
> Should HEAD r255873 be reverted as a result of HEAD r255891?

I don't think so (note that BIND is now removed from HEAD so there is
nothing to revert anyways).  See below.

> I see HEAD r255891 got MFC'd (as r255924) -- thank you.  I had a
> feeling the issue was in libedit but wasn't entirely certain which
> was the proper place to fix it.

No.  The libedit change was a bug for bandaid one so using libedit in
place of readline won't crash.

The original GNU readline example [1] reads:

  /* If the line has any text in it,
     save it on the history. */
  if (line_read && *line_read)
    add_history (line_read);

Normally the documented example is the recommended practice of how to
use the library API.  Note that neither libedit or readline handles
the case where add_history("") is called specially.

The BIND code was changed to match this but since the change is no
longer a critical one with the libedit change, I will leave the stable
branch as-is for now and see how far my bug report to ISC would go.


- -- 
Xin LI <delphij at>
FreeBSD - The Power to Serve!           Live free or die
Version: GnuPG v2.0.21 (FreeBSD)


More information about the freebsd-bugs mailing list