From owner-freebsd-bugs@FreeBSD.ORG Mon Oct 11 06:10:02 2010 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 346BE1065672 for ; Mon, 11 Oct 2010 06:10:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id EB7298FC12 for ; Mon, 11 Oct 2010 06:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o9B6A1FL093643 for ; Mon, 11 Oct 2010 06:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o9B6A1F2093642; Mon, 11 Oct 2010 06:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 11 Oct 2010 06:10:01 GMT Resent-Message-Id: <201010110610.o9B6A1F2093642@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Dominic Fandrey Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 00D05106564A for ; Mon, 11 Oct 2010 06:09:07 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id E46738FC12 for ; Mon, 11 Oct 2010 06:09:06 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o9B696Xk037284 for ; Mon, 11 Oct 2010 06:09:06 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o9B696bo037279; Mon, 11 Oct 2010 06:09:06 GMT (envelope-from nobody) Message-Id: <201010110609.o9B696bo037279@www.freebsd.org> Date: Mon, 11 Oct 2010 06:09:06 GMT From: Dominic Fandrey To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: bin/151384: rs(1) damages data 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, 11 Oct 2010 06:10:02 -0000 >Number: 151384 >Category: bin >Synopsis: rs(1) damages data >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: Mon Oct 11 06:10:01 UTC 2010 >Closed-Date: >Last-Modified: >Originator: Dominic Fandrey >Release: RELENG_8 >Organization: private >Environment: FreeBSD mobileKamikaze.norad 8.1-STABLE FreeBSD 8.1-STABLE #0: Mon Sep 6 17:08:51 CEST 2010 root@mobileKamikaze.norad:/usr/obj/HP6510b-8/amd64/usr/src/sys/HP6510b-8 amd64 >Description: Recently rs has adopted a habit of damaging data in long lines of input. I've been relying on it to reformat dependency data, I had to switch to sed, which has a slight performance impact for my use case. >How-To-Repeat: # jot -s\ -b 01234567 1000 | rs 0 1 | grep -vxF 01234567 012345 67 012 34567 012345 67 012 34567 012345 67 012 34567 The jot command prints the string 01234567 a thousand times in a single row. The rs command is supposed to generate an automatic(0) number of rows with 1 column per row. I.e. every word stands in its own line. The grep filters all intact words, so everything that is printed, was damaged by rs. This has the look of a repetitive pattern to me, probably this happens at a fixed buffer boundary. >Fix: >Release-Note: >Audit-Trail: >Unformatted: