From owner-freebsd-stable@FreeBSD.ORG Wed Feb 11 01:22:40 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 8294B761 for ; Wed, 11 Feb 2015 01:22:40 +0000 (UTC) Received: from maul.immure.com (108-84-10-9.lightspeed.austtx.sbcglobal.net [108.84.10.9]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F08E882 for ; Wed, 11 Feb 2015 01:22:39 +0000 (UTC) Received: from rancor.immure.com ([10.1.132.9]) by maul.immure.com with esmtp (Exim 4.85 (FreeBSD)) (envelope-from ) id 1YLK0w-000PpN-8C; Tue, 10 Feb 2015 17:14:42 -0600 Received: from rancor.immure.com (localhost [127.0.0.1]) by rancor.immure.com (8.14.9/8.14.9) with ESMTP id t1ANEgBc000745; Tue, 10 Feb 2015 17:14:42 -0600 (CST) (envelope-from bob@rancor.immure.com) Received: (from bob@localhost) by rancor.immure.com (8.14.9/8.14.9/Submit) id t1ANEfQA000744; Tue, 10 Feb 2015 17:14:41 -0600 (CST) (envelope-from bob) Date: Tue, 10 Feb 2015 17:14:41 -0600 From: Bob Willcox To: John-Mark Gurney Message-ID: <20150210231440.GB471@rancor.immure.com> Reply-To: Bob Willcox References: <20150201175159.7fa88d16@B85M-HD3-0.alogt.com> <20150203003307.GG27103@funkthat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150203003307.GG27103@funkthat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SA-Exim-Connect-IP: 10.1.132.9 X-SA-Exim-Mail-From: bob@immure.com X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on maul.immure.com X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, T_RP_MATCHES_RCVD, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Subject: Re: top, fixed buffer length in utils.c X-SA-Exim-Version: 4.2 X-SA-Exim-Scanned: Yes (on maul.immure.com) Cc: Erich Dollansky , freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2015 01:22:40 -0000 On Mon, Feb 02, 2015 at 04:33:07PM -0800, John-Mark Gurney wrote: > Erich Dollansky wrote this message on Sun, Feb 01, 2015 at 17:51 +0800: > > int can be 64 bits on a amd64 machine. Why is the author of this code > > so sure that we will never cross the 32 bit boundary? > > Per others, int is currently 32bits on all platforms we support... > > I guess adding: > CTASSERT(sizeof(int) <= 4); > > would help fix your concern? at least now the expectation is codified > and if it breaks, the build will break.. > > -- > John-Mark Gurney Voice: +1 415 225 5579 > If/when the size of an int ever changes from being 32 bits, top will be the least of our worries! Bob -- Bob Willcox | You climb to reach the summit, but once bob@immure.com | there, discover that all roads lead down. Austin, TX | -- Stanislaw Lem, "The Cyberiad"