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: Mon, 11 Apr 2011 05:54:47 +0300 Message-ID: <8362qlsdjc.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> <83pqovrxap.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1302491260 4373 80.91.229.12 (11 Apr 2011 03:07:40 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 11 Apr 2011 03:07:40 +0000 (UTC) Cc: eggert@cs.ucla.edu, 8435@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Apr 11 05:07:36 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 1Q97TP-0001fe-Bn for geb-bug-gnu-emacs@m.gmane.org; Mon, 11 Apr 2011 05:07:31 +0200 Original-Received: from localhost ([127.0.0.1]:33993 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q97TN-0006XN-TG for geb-bug-gnu-emacs@m.gmane.org; Sun, 10 Apr 2011 23:07:29 -0400 Original-Received: from [140.186.70.92] (port=40229 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Q97TH-0006XA-Ly for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2011 23:07:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Q97TG-0004wj-Ib for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2011 23:07:23 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:37029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Q97TG-0004wf-Cu for bug-gnu-emacs@gnu.org; Sun, 10 Apr 2011 23:07:22 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1Q97LC-000160-6S; Sun, 10 Apr 2011 22:59: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: Mon, 11 Apr 2011 02:59: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.13024907204186 (code B ref 8435); Mon, 11 Apr 2011 02:59:02 +0000 Original-Received: (at 8435) by debbugs.gnu.org; 11 Apr 2011 02:58:40 +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 1Q97Kp-00015R-64 for submit@debbugs.gnu.org; Sun, 10 Apr 2011 22:58:39 -0400 Original-Received: from mtaout20.012.net.il ([80.179.55.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1Q97Kn-00015E-OI for 8435@debbugs.gnu.org; Sun, 10 Apr 2011 22:58:38 -0400 Original-Received: from conversion-daemon.a-mtaout20.012.net.il by a-mtaout20.012.net.il (HyperSendmail v2007.08) id <0LJG00500VZR1A00@a-mtaout20.012.net.il> for 8435@debbugs.gnu.org; Mon, 11 Apr 2011 05:56:46 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([84.229.239.68]) by a-mtaout20.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0LJG00467W6LBBI0@a-mtaout20.012.net.il>; Mon, 11 Apr 2011 05:56:46 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Sun, 10 Apr 2011 22:59: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:45749 Archived-At: > From: Stefan Monnier > Cc: eggert@cs.ucla.edu, 8435@debbugs.gnu.org > Date: Sun, 10 Apr 2011 22:44:13 -0300 > > >> If the problematic case can be detected easily, that's good enough. > > What would you suggest to do if we detect it? To recap, this is in > > the context of `message' or `error' called to produce a message about > > something. > > IIRC those cases correspond to programming bugs (since the change > shifts the burden to the caller), so what needs to be done in those > cases is to signal an "internal error in foo.c:nnn". > > > There are two issues: > > > . %c used to display a non-ASCII character, when the data points to a > > multibyte sequence. doprnt converts the data to a wide character, > > when it displays the message, vsnprintf does not. > > > . If the buffer supplied to doprnt is too small, it takes care to > > truncate the text only on character boundaries, whereas vsnprintf > > will not. > > It sounds like both cases can be caught more easily than they can be > fixed, right? I think both ways are comparable (if I understand correctly what you mean by "caught").