GNU bug report logs - #25390
Segfault with sed 4.3

Previous Next

Package: sed;

Reported by: "S. Gilles" <sgilles <at> math.umd.edu>

Date: Sun, 8 Jan 2017 07:09:01 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #32 received at 25390 <at> debbugs.gnu.org (full text, mbox):

From: Assaf Gordon <assafgordon <at> gmail.com>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
Cc: 25390 <at> debbugs.gnu.org, Paul Eggert <eggert <at> cs.ucla.edu>,
 Gnulib bugs <bug-gnulib <at> gnu.org>, "S. Gilles" <sgilles <at> math.umd.edu>,
 GNU grep developers <grep-devel <at> gnu.org>
Subject: Re: bug#25390: Segfault with sed 4.3
Date: Tue, 10 Jan 2017 00:27:09 -0500
[Message part 1 (text/plain, inline)]
Hello all,

> On Jan 9, 2017, at 09:11, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> 
> Sorry, I adjusted commit log, New patch does not change
> testsuite/Makefile.tests.
> <0001-tests-new-test-for-dfa-crash-bug.patch>


Paul,
Thank you for the quick fix.

Norihiro,
Thank you for the dfa improvements and sed-tests.

Using your example of:
   printf '0123456789abcd\nx\n' | valgrind ./sed/sed 'N;s/0123456789abcd\n//'
I wasn't able to trigger the segfault (or even a valgrind warning) on sed-4.3 / x86_64.

I suggest modifying the input just a bit, making it slightly more similar to the original bug report - with it I'm able to always reproduce the segfault:
   printf "abcdefg abcdefg\nB\n" | valgrind ./sed/sed 'N;s/abcdefg.*\n//'

What do you think ?

I'm also considering duplicating the test - once with and once without valgrind.
Is this warranted or an overkill ?

Attach patch contains updated tests (and slightly modified git-comment).
The second commit updates gnulib (comes after adding the tests just temporarily, to make testing before/after gnulib update easier).

comments welcomed,
 - assaf

[newline-bug.patch (application/octet-stream, attachment)]
[Message part 3 (text/plain, inline)]



This bug report was last modified 8 years and 120 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.