From jbeich@tormail.org  Tue Jan 15 03:52:53 2013
Return-Path: <jbeich@tormail.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id A72A8160
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Jan 2013 03:52:53 +0000 (UTC)
	(envelope-from jbeich@tormail.org)
Received: from outgoing.tormail.org (outgoing.tormail.org [82.221.96.22])
	by mx1.freebsd.org (Postfix) with ESMTP id 69427219
	for <FreeBSD-gnats-submit@freebsd.org>; Tue, 15 Jan 2013 03:52:53 +0000 (UTC)
Received: from localhost ([127.0.0.1] helo=internal.tormail.org)
	by outgoing.tormail.org with esmtp (Exim 4.72)
	(envelope-from <jbeich@tormail.org>)
	id 1TuxZs-0007lv-BQ
	for FreeBSD-gnats-submit@freebsd.org; Tue, 15 Jan 2013 06:52:44 +0300
Received: from jbeich by internal.tormail.org with local (Exim 4.63)
	(envelope-from <jbeich@tormail.org>)
	id 1TuxY3-000Jp1-Sl
	for FreeBSD-gnats-submit@freebsd.org; Tue, 15 Jan 2013 03:50:52 +0000
Message-Id: <1TuxY3-000Jp1-Sl@internal.tormail.org>
Date: Tue, 15 Jan 2013 12:52:04 +0900
From: Jan Beich <jbeich@tormail.org>
To: FreeBSD-gnats-submit@freebsd.org
Subject: [regression] bsdgrep(1) broken multidot escaping since r225435

>Number:         175314
>Category:       bin
>Synopsis:       [regression] bsdgrep(1) broken multidot escaping since r225435
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Quarter:
>Keywords:
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jan 15 04:00:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Jan Beich
>Release:        FreeBSD 10.0-CURRENT amd64
>Organization:
>Environment:
On /stable/9 and less jemalloc options syntax is different:

  MALLOC_CONF=junk:true -> MALLOC_OPTIONS=J
  MALLOC_CONF=junk:false -> MALLOC_OPTIONS=j

cf. malloc(3) manpage e.g.,

     Other flags control boolean parameters, where uppercase indicates
     that a behavior is set, or on, and lowercase means that a behavior
     is not set, or off.
>Description:
(originally reported to gabor@ on 04 Dec 2011)

After r225435 bsdgrep built WITHOUT_NLS became sensitive to whether
allocated memory but not initalized memory is set to NULL or junk. In
particular, this leads to false positives on MALLOC_PRODUCTION when
matching a pattern with multiple dots some of which may be escaped.

http://svnweb.freebsd.org/changeset/base/225435 (merged into /head)
>How-To-Repeat:
$ make all install WITHOUT_NLS= -C/usr/src/usr.bin/grep

$ echo 'f.oo' | env -i MALLOC_CONF=junk:true bsdgrep -o 'f.o\.'
Exit 1
$ echo 'f.oo' | env -i MALLOC_CONF=junk:false bsdgrep -o 'f.o\.'
f.oo

$ echo 'f.oo' | env -i MALLOC_CONF=junk:true gnugrep -o 'f.o\.'
Exit 1
$ echo 'f.oo' | env -i MALLOC_CONF=junk:false gnugrep -o 'f.o\.'
Exit 1
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
