GNU bug report logs - #24161
[PATCH 2/2] sed: speed up matching by reguler expression with dfa matcher

Previous Next

Package: sed;

Reported by: Norihiro Tanaka <noritnk <at> kcn.ne.jp>

Date: Fri, 5 Aug 2016 14:05:01 UTC

Severity: normal

Tags: patch

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 24161-done <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Jim Meyering <jim <at> meyering.net>
Cc: 24161-done <at> debbugs.gnu.org, Assaf Gordon <assafgordon <at> gmail.com>
Subject: Re: bug#24161: [PATCH 2/2] sed: speed up matching by reguler
 expression with dfa matcher
Date: Tue, 09 Aug 2016 22:59:33 +0900
On Mon, 8 Aug 2016 18:33:26 -0700
Jim Meyering <jim <at> meyering.net> wrote:

> On Mon, Aug 8, 2016 at 5:53 PM, Jim Meyering <jim <at> meyering.net> wrote:
> > On Mon, Aug 8, 2016 at 4:29 PM, Norihiro Tanaka <noritnk <at> kcn.ne.jp> wrote:
> ...
> >> Thanks for adjusting.  I agree the all changes.
> >
> > Pushed.
> 
> Oops. I had not run ASAN-enabled tests with this patch.
> Doing that exposed many test failures like this:
> 
> LC_ALL=C  ./sed/sed -f ./testsuite/madding.sed \
>         < ./testsuite/madding.inp | LC_ALL=C tr -d \\r > madding.out
> =================================================================
> ==8797==ERROR: AddressSanitizer: heap-buffer-overflow on address
> 0x622000019646 at pc 0x0000004e98ce bp 0x7ffee5d23130 sp
> 0x7ffee5d23128
> READ of size 1 at 0x622000019646 thread T0
>     #0 0x4e98cd in dfaexec_main sed/dfa.c:3078
>     #1 0x4e98cd in dfaexec_sb sed/dfa.c:3242
>     #2 0x4ece9f in dfaexec sed/dfa.c:3263
>     #3 0x4f64ba in match_regex sed/regexp.c:270
>     #4 0x4f46ac in do_subst sed/execute.c:1024
>     #5 0x4f46ac in execute_program sed/execute.c:1510
>     #6 0x4f5997 in process_files sed/execute.c:1678
>     #7 0x4f6f64 in main sed/sed.c:363
>     #8 0x7fe665f89730 in __libc_start_main (/lib64/libc.so.6+0x20730)
>     #9 0x407118 in _start (/home/j/w/co/sed/sed/sed+0x407118)
> 
> which I am fixing with this patch:

Special thanks for catching up abd fixing heap-buffer-overflow bug.





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

Previous Next


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