From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Davis Herring" Newsgroups: gmane.emacs.devel Subject: Re: oops? read/write vs type of length parameter Date: Tue, 12 Apr 2011 05:32:30 -0700 (PDT) Message-ID: <51964.130.55.132.62.1302611550.squirrel@webmail.lanl.gov> References: <87wrj1jhfc.fsf@rho.meyering.net> <87hba5yq0p.fsf@uwakimon.sk.tsukuba.ac.jp> <834o64sxd7.fsf@gnu.org> <4DA3A7F8.1020503@cs.ucla.edu> <83k4f0qijz.fsf@gnu.org> <4DA3DDCD.10700@cs.ucla.edu> Reply-To: herring@lanl.gov NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain;charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1302611570 31880 80.91.229.12 (12 Apr 2011 12:32:50 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 12 Apr 2011 12:32:50 +0000 (UTC) Cc: Eli Zaretskii , emacs-devel@gnu.org To: "Paul Eggert" Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 12 14:32:46 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from [140.186.70.17] (helo=lists.gnu.org) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q9clx-00026S-5g for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 14:32:45 +0200 Original-Received: from localhost ([::1]:44055 helo=lists2.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9clw-0006Qg-LR for ged-emacs-devel@m.gmane.org; Tue, 12 Apr 2011 08:32:44 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:47603) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9clu-0006Q3-DK for emacs-devel@gnu.org; Tue, 12 Apr 2011 08:32:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q9clt-0003yJ-8x for emacs-devel@gnu.org; Tue, 12 Apr 2011 08:32:42 -0400 Original-Received: from proofpoint2.lanl.gov ([204.121.3.26]:32884) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q9cls-0003xA-WE; Tue, 12 Apr 2011 08:32:41 -0400 Original-Received: from mailrelay1.lanl.gov (mailrelay1.lanl.gov [128.165.4.101]) by proofpoint2.lanl.gov (8.14.3/8.14.3) with ESMTP id p3CCWVL0014410; Tue, 12 Apr 2011 06:32:31 -0600 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by mailrelay1.lanl.gov (Postfix) with ESMTP id 0A6B5162E86; Tue, 12 Apr 2011 06:32:31 -0600 (MDT) X-NIE-2-Virus-Scanner: amavisd-new at mailrelay1.lanl.gov Original-Received: from webmail1.lanl.gov (webmail1.lanl.gov [128.165.4.106]) by mailrelay1.lanl.gov (Postfix) with ESMTP id E8948162E79; Tue, 12 Apr 2011 06:32:30 -0600 (MDT) Original-Received: by webmail1.lanl.gov (Postfix, from userid 48) id E34E71CA80C9; Tue, 12 Apr 2011 06:32:30 -0600 (MDT) Original-Received: from 130.55.132.62 (SquirrelMail authenticated user 196434) by webmail.lanl.gov with HTTP; Tue, 12 Apr 2011 05:32:30 -0700 (PDT) In-Reply-To: <4DA3DDCD.10700@cs.ucla.edu> User-Agent: SquirrelMail/1.4.8-5.el5_4.10.lanl3 X-Priority: 3 (Normal) Importance: Normal X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.2.15, 1.0.148, 0.0.0000 definitions=2011-04-12_04:2011-04-12, 2011-04-12, 1970-01-01 signatures=0 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 204.121.3.26 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-Broken-Reverse-DNS: no host name found for IP address 140.186.70.17 Xref: news.gmane.org gmane.emacs.devel:138434 Archived-At: >> When Emacs saves a buffer or some its portion, >> write-region can call emacs_write (though a_write and e_write) with >> the full extent of the region to be saved. > > Ah, sorry, I missed that one. In that case 'int' > clearly won't do for the size. This has been said several times, apparently assuming that the whole length _must_ be passed. But other callers call these functions with small arguments in a loop. Can't that be used (with perhaps more like 64 MiB than 64 KiB per call) for these large files too? Davis -- This product is sold by volume, not by mass. If it appears too dense or too sparse, it is because mass-energy conversion has occurred during shipping.