Date: Tue, 2 Dec 2008 12:56:18 GMT From: Mathieu Virbel <mathieu.virbel@netasq.com> To: freebsd-gnats-submit@FreeBSD.org Subject: bin/129370: sed: invalid output (memory dump) with invalid regexp and \1 Message-ID: <200812021256.mB2CuIJH012249@www.freebsd.org> Resent-Message-ID: <200812021300.mB2D026G066209@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 129370 >Category: bin >Synopsis: sed: invalid output (memory dump) with invalid regexp and \1 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Tue Dec 02 13:00:01 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Mathieu Virbel >Release: 7.0-STABLE >Organization: NETASQ >Environment: FreeBSD quark 7.0-STABLE FreeBSD 7.0-STABLE #1: Thu Oct 9 16:19:45 CEST 2008 root@quark:/usr/obj/usr/src/sys/GENERIC i386 >Description: Instead of report an invalid regexp error, sed abort anormaly when we doing bad things like : Command: echo 'a' | sed 's/^a/\1/' Result: sed: realloc: Cannot allocate memory Command: echo 'aa' | sed 's/^a/\1/' Result: (@(@(@(@(@(@(@(@(@(@(@(@(@(@(... << memory dump. What we would like to have -------------------------- Command: echo 'a' | sed 's/^a/\1/' Result: sed: -e expression #1, char 8: invalid reference \1 on `s' command's RHS >How-To-Repeat: Try one of these : - echo 'a' | sed 's/^a/\1/' - echo 'aa' | sed 's/^a/\1/' >Fix: >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200812021256.mB2CuIJH012249>