bin/129370: sed: invalid output (memory dump) with invalid regexp
and \1
Mathieu Virbel
mathieu.virbel at netasq.com
Tue Dec 2 05:00:02 PST 2008
>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 at 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:
More information about the freebsd-bugs
mailing list