From owner-freebsd-stable@FreeBSD.ORG Fri Oct 8 09:43:41 2010 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 861D910656A9 for ; Fri, 8 Oct 2010 09:43:41 +0000 (UTC) (envelope-from kamikaze@bsdforen.de) Received: from mail.bsdforen.de (bsdforen.de [212.204.60.79]) by mx1.freebsd.org (Postfix) with ESMTP id 405EF8FC18 for ; Fri, 8 Oct 2010 09:43:40 +0000 (UTC) Received: from mobileKamikaze.norad (HSI-KBW-078-042-098-160.hsi3.kabel-badenwuerttemberg.de [78.42.98.160]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.bsdforen.de (Postfix) with ESMTP id ABD4D8A28C8 for ; Fri, 8 Oct 2010 11:43:39 +0200 (CEST) Message-ID: <4CAEE7CA.3090909@bsdforen.de> Date: Fri, 08 Oct 2010 11:43:38 +0200 From: Dominic Fandrey User-Agent: Mozilla/5.0 (X11; U; FreeBSD amd64; en-GB; rv:1.9.1.12) Gecko/20100918 Thunderbird/3.0.8 MIME-Version: 1.0 To: freebsd-stable@freebsd.org X-Enigmail-Version: 1.0.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Subject: rs(1) damages data X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Oct 2010 09:43:41 -0000 Recently rs has adopted a habit of damaging data in long lines of input. This can easily be tested: # 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. > uname -a 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 -- A: Because it fouls the order in which people normally read text. Q: Why is top-posting such a bad thing? A: Top-posting. Q: What is the most annoying thing on usenet and in e-mail?