Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Jan 2013 12:52:04 +0900
From:      Jan Beich <jbeich@tormail.org>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/175314: [regression] bsdgrep(1) broken multidot escaping since r225435
Message-ID:  <1TuxY3-000Jp1-Sl@internal.tormail.org>
Resent-Message-ID: <201301150400.r0F401xV078824@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1TuxY3-000Jp1-Sl>