From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#8435: misuse of error ("...%d...", ...) on 64-bit hosts Date: Sat, 09 Apr 2011 23:21:02 +0300 Message-ID: <83pqovrxap.fsf@gnu.org> References: <4D9CC60D.2090301@cs.ucla.edu> <4D9D68D8.6060200@cs.ucla.edu> <8339ltvrok.fsf@gnu.org> <4D9E21FB.70802@cs.ucla.edu> <83vcypt8zf.fsf@gnu.org> <4D9F9B74.6050908@cs.ucla.edu> <83d3kvubzp.fsf@gnu.org> <4DA0A448.7000203@cs.ucla.edu> <83tye7s2cf.fsf@gnu.org> <4DA0B60F.6010909@cs.ucla.edu> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1302381468 19682 80.91.229.12 (9 Apr 2011 20:37:48 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 9 Apr 2011 20:37:48 +0000 (UTC) Cc: 8435@debbugs.gnu.org To: Paul Eggert Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Apr 09 22:37:41 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1Q8euW-0002K4-Rn for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Apr 2011 22:37:37 +0200 Original-Received: from localhost ([127.0.0.1]:41080 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8euV-0008Fn-Or for geb-bug-gnu-emacs@m.gmane.org; Sat, 09 Apr 2011 16:37:35 -0400 Original-Received: from [140.186.70.92] (port=54426 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q8euI-0008Dz-7z for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:37:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q8euG-0001XM-OP for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:37:22 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:51501) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q8euG-0001XC-Mu for bug-gnu-emacs@gnu.org; Sat, 09 Apr 2011 16:37:20 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q8ehO-0003g2-47; Sat, 09 Apr 2011 16:24:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 09 Apr 2011 20:24:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 8435 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 8435-submit@debbugs.gnu.org id=B8435.130238059114075 (code B ref 8435); Sat, 09 Apr 2011 20:24:02 +0000 Original-Received: (at 8435) by debbugs.gnu.org; 9 Apr 2011 20:23:11 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8egZ-0003ex-3X for submit@debbugs.gnu.org; Sat, 09 Apr 2011 16:23:11 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q8egW-0003ek-J4 for 8435@debbugs.gnu.org; Sat, 09 Apr 2011 16:23:09 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LJE00500J9HNP00@a-mtaout20.012.net.il> for 8435@debbugs.gnu.org; Sat, 09 Apr 2011 23:23:02 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.239.68]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LJE005FNJAC53B0@a-mtaout20.012.net.il>; Sat, 09 Apr 2011 23:23:02 +0300 (IDT) In-reply-to: <4DA0B60F.6010909@cs.ucla.edu> X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sat, 09 Apr 2011 16:24:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:45722 Archived-At: > Date: Sat, 09 Apr 2011 12:39:59 -0700 > From: Paul Eggert > CC: 8435@debbugs.gnu.org > > As Emacs evolves, if we find that more lines of code are affected, > then the tradeoffs will change. If that happens, it shouldn't > be hard to come up with a doprnt replacement that uses > vsnprintf internally and that also handles multibyte character > truncation and non-8-bit codepoints. I'd prefer that we do this now. Leaving the problem to lurk for future maintainers to deal with it would mean maintenance burden and/or subtle bugs waiting to bite. Emacs is a large and complex program, with many areas of its code understandable only by a tiny few, sometimes by a single individual. Leaving such dark corners means trading somebody else's future efforts for our current convenience. I just spent the best part of my weekend hunting `int's that should have been EMACS_INT's (which, btw, is the only _real_ problem with overflow that I know about), and I would hate to leave similar problems to those who will come after us.