From owner-freebsd-bugs@FreeBSD.ORG Mon Apr 2 13:17:29 2007 Return-Path: X-Original-To: freebsd-bugs@freebsd.org Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7E03716A404 for ; Mon, 2 Apr 2007 13:17:29 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from mail.kon.de (mail.kon.de [81.88.34.125]) by mx1.freebsd.org (Postfix) with ESMTP id 43EE613C48C for ; Mon, 2 Apr 2007 13:17:29 +0000 (UTC) (envelope-from s.behrens@kon.de) Received: from localhost (localhost.localdomain [127.0.0.1]) by mail.kon.de (Postfix) with ESMTP id 3257E400F77F1 for ; Mon, 2 Apr 2007 14:38:22 +0200 (CEST) X-Virus-Scanned: spam-virus-check at kon.de Received: from mail.kon.de ([127.0.0.1]) by localhost (mail.kon.de [127.0.0.1]) (amavisd-new, port 10024) with LMTP id DaxlO1miaG3n for ; Mon, 2 Apr 2007 14:38:21 +0200 (CEST) Received: from [192.168.0.4] (dslb-084-060-033-091.pools.arcor-ip.net [84.60.33.91]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kon.de (Postfix) with ESMTP id 515F9400B9952 for ; Mon, 2 Apr 2007 14:38:21 +0200 (CEST) Message-ID: <4610F941.3080009@kon.de> Date: Mon, 02 Apr 2007 14:38:25 +0200 From: Stan Behrens User-Agent: Thunderbird 1.5.0.10 (X11/20070306) MIME-Version: 1.0 To: freebsd-bugs@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: 6.2-STABLE / grep / Segmentation fault X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 13:17:29 -0000 Hi, This silly script brings grep into trouble, please don't ask why I do this that way (and yes, I know here-docs ...): <<>> #!/bin/sh extract () { grep -m 1 -A 99 '^//START '$1'$' $0 | \ grep -m 1 -B 99 '^//STOP '$1'$' | \ grep -v '^//\(START\|STOP\) '$1'$' } extract /etc/rc.local >rc.local extract /etc/rc.conf >rc.conf exit //START /etc/rc.local hier config fuer neues system da auch config fuer neues system //STOP /etc/rc.local //START /etc/rc.conf hostname="blub.hausen" //STOP /etc/rc.conf <<>> Here is the backtrace: <<>> (gdb) bt #0 0x0804de4d in dfaexec (d=0x8059a80, begin=0x8063141 "//START /etc/rc.conf\nhostname=\"blub.hausen\"\n//STOP /etc/rc.conf\n", size=4160343744, backref=0xbfbfe690) at dfa.c:2854 #1 0x08053a1e in EGexecute ( buf=0x8063141 "//START /etc/rc.conf\nhostname=\"blub.hausen\"\n//STOP /etc/rc.conf\n", size=20, match_size=0x1, exact=0) at search.c:430 #2 0x0804f8f0 in prpending (lim=0x8063181 "") at grep.c:672 #3 0x08050366 in grepfile (file=0xbfbfea74 "blub.sh", stats=0x80596c0) at grep.c:887 #4 0x080514d7 in main (argc=7, argv=0xbfbfe950) at grep.c:1850 <<>> I hope I could help, Bye.