From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Buffer size limitation in insdel.c Date: Fri, 24 Sep 2010 16:28:01 +0200 Message-ID: <834odftdvy.fsf@gnu.org> References: <834odivv7v.fsf@gnu.org> <83r5gkvqpf.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1285338492 2916 80.91.229.12 (24 Sep 2010 14:28:12 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Fri, 24 Sep 2010 14:28:12 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Sep 24 16:28:10 2010 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Oz9Fy-00006c-0Z for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 16:28:10 +0200 Original-Received: from localhost ([127.0.0.1]:39074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oz9Fx-00049A-D7 for ged-emacs-devel@m.gmane.org; Fri, 24 Sep 2010 10:28:09 -0400 Original-Received: from [140.186.70.92] (port=35597 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Oz9Fr-00047V-0y for emacs-devel@gnu.org; Fri, 24 Sep 2010 10:28:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1Oz9Fp-0007dN-Uc for emacs-devel@gnu.org; Fri, 24 Sep 2010 10:28:03 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]:48663) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Oz9Fp-0007d8-L9; Fri, 24 Sep 2010 10:28:01 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0L9900J009I7B800@a-mtaout20.012.net.il>; Fri, 24 Sep 2010 16:27:59 +0200 (IST) Original-Received: from HOME-C4E4A596F7 ([77.127.203.3]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0L9900JIS9II6730@a-mtaout20.012.net.il>; Fri, 24 Sep 2010 16:27:58 +0200 (IST) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:130778 Archived-At: > From: Richard Stallman > CC: emacs-devel@gnu.org > Date: Fri, 24 Sep 2010 10:09:15 -0400 > > It hides bugs, if nothing else. > > Could you please explain what you mean? Usually an error check does > not hide bugs; rather, it catches them early. Ah, but this is not an error check. This code prevents us from using buffers larger than what a 32-bit int can cover, i.e. 2GB. By contrast, an Emacs integer is a 64-bit type on 64-bit machines, so we could potentially have much larger buffers there. The reason for this code is that many places use an int to hold buffer positions. All these places are bugs; they should use EMACS_INT instead. This code hides those bugs.