From unknown Tue Jun 17 01:26:20 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#8601 <8601@debbugs.gnu.org> To: bug#8601 <8601@debbugs.gnu.org> Subject: Status: * 2 -> * 4 typo fix in detect_coding_charset Reply-To: bug#8601 <8601@debbugs.gnu.org> Date: Tue, 17 Jun 2025 08:26:20 +0000 retitle 8601 * 2 -> * 4 typo fix in detect_coding_charset reassign 8601 emacs submitter 8601 Paul Eggert severity 8601 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 14:19:22 2011 Received: (at submit) by debbugs.gnu.org; 1 May 2011 18:19:22 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGbEo-0008G8-Hi for submit@debbugs.gnu.org; Sun, 01 May 2011 14:19:22 -0400 Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGbEm-0008Fx-Ga for submit@debbugs.gnu.org; Sun, 01 May 2011 14:19:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGbEg-0008H3-ES for submit@debbugs.gnu.org; Sun, 01 May 2011 14:19:15 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_RP_MATCHES_RCVD autolearn=unavailable version=3.3.1 Received: from lists.gnu.org ([140.186.70.17]:34063) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGbEg-0008Gw-CS for submit@debbugs.gnu.org; Sun, 01 May 2011 14:19:14 -0400 Received: from eggs.gnu.org ([140.186.70.92]:56728) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGbEf-0005Hb-7B for bug-gnu-emacs@gnu.org; Sun, 01 May 2011 14:19:14 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QGbEe-0008GW-3T for bug-gnu-emacs@gnu.org; Sun, 01 May 2011 14:19:13 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]:53878) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QGbEd-0008GR-UN; Sun, 01 May 2011 14:19:12 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id EA3FD39E8083; Sun, 1 May 2011 11:19:10 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id EbqSoKJoCReB; Sun, 1 May 2011 11:19:10 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 205D339E80F5; Sun, 1 May 2011 11:19:10 -0700 (PDT) Message-ID: <4DBDA41D.1010008@cs.ucla.edu> Date: Sun, 01 May 2011 11:19:09 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: bug-gnu-emacs@gnu.org Subject: * 2 -> * 4 typo fix in detect_coding_charset Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.17 X-Spam-Score: -4.7 (----) X-Debbugs-Envelope-To: submit Cc: Miles Bader X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -4.7 (----) By code inspection it appears that there's a typo in detect_coding_charset: an index is multiplied by 2 when it should be multiplied by 4. By bisecting it appears that this typo was introduced here: revno: 84043 [merge] committer: Miles Bader timestamp: Fri 2008-02-01 16:01:31 +0000 message: Merge unicode branch Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1037 so I'll CC: this to Miles. Here's a proposed patch. I haven't tested this, as I don't have the time to fully understand this code. But from the description and other uses of code_space, the "* 2" must be wrong. === modified file 'src/coding.c' --- src/coding.c 2011-04-29 19:47:29 +0000 +++ src/coding.c 2011-05-01 18:05:21 +0000 @@ -5368,8 +5368,8 @@ detect_coding_charset (struct coding_sys if (src == src_end) goto too_short; ONE_MORE_BYTE (c); - if (c < charset->code_space[(dim - 1 - idx) * 2] - || c > charset->code_space[(dim - 1 - idx) * 2 + 1]) + if (c < charset->code_space[(dim - 1 - idx) * 4] + || c > charset->code_space[(dim - 1 - idx) * 4 + 1]) break; } if (idx < dim) From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 15:07:09 2011 Received: (at 8601) by debbugs.gnu.org; 1 May 2011 19:07:09 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGbz2-0000ul-NT for submit@debbugs.gnu.org; Sun, 01 May 2011 15:07:09 -0400 Received: from mail-out.m-online.net ([212.18.0.9]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGbz0-0000uF-2Q for 8601@debbugs.gnu.org; Sun, 01 May 2011 15:07:06 -0400 Received: from frontend1.mail.m-online.net (unknown [192.168.8.180]) by mail-out.m-online.net (Postfix) with ESMTP id 6FB751C007CE; Sun, 1 May 2011 21:07:00 +0200 (CEST) Received: from localhost (dynscan1.mnet-online.de [192.168.8.164]) by mail.m-online.net (Postfix) with ESMTP id 382491C0008F; Sun, 1 May 2011 21:07:00 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Received: from mail.mnet-online.de ([192.168.8.180]) by localhost (dynscan1.mail.m-online.net [192.168.8.164]) (amavisd-new, port 10024) with ESMTP id FlwYrhTBTrEE; Sun, 1 May 2011 21:07:00 +0200 (CEST) Received: from igel.home (ppp-88-217-115-33.dynamic.mnet-online.de [88.217.115.33]) by mail.mnet-online.de (Postfix) with ESMTP; Sun, 1 May 2011 21:06:59 +0200 (CEST) Received: by igel.home (Postfix, from userid 501) id 68107CA29C; Sun, 1 May 2011 21:06:59 +0200 (CEST) From: Andreas Schwab To: Paul Eggert Subject: Re: bug#8601: * 2 -> * 4 typo fix in detect_coding_charset References: <4DBDA41D.1010008@cs.ucla.edu> X-Yow: I have seen these EGG EXTENDERS in my Supermarket.. .. I have read the INSTRUCTIONS... Date: Sun, 01 May 2011 21:06:59 +0200 In-Reply-To: <4DBDA41D.1010008@cs.ucla.edu> (Paul Eggert's message of "Sun, 01 May 2011 11:19:09 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Score: -2.6 (--) X-Debbugs-Envelope-To: 8601 Cc: 8601@debbugs.gnu.org, Miles Bader X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -2.6 (--) Paul Eggert writes: > By code inspection it appears that there's a typo in > detect_coding_charset: an index is multiplied by 2 > when it should be multiplied by 4. By bisecting it > appears that this typo was introduced here: > > revno: 84043 [merge] Except that a merge commit is never adequate for infering blame. See e209e347 for the real source. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." From debbugs-submit-bounces@debbugs.gnu.org Sun May 01 15:25:46 2011 Received: (at 8601) by debbugs.gnu.org; 1 May 2011 19:25:46 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGcH4-0001L9-5Z for submit@debbugs.gnu.org; Sun, 01 May 2011 15:25:46 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QGcH1-0001Ks-1K for 8601@debbugs.gnu.org; Sun, 01 May 2011 15:25:44 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id 7F7EA39E80F5; Sun, 1 May 2011 12:25:37 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 33rFQa0UZoqg; Sun, 1 May 2011 12:25:36 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A3E6239E80F2; Sun, 1 May 2011 12:25:36 -0700 (PDT) Message-ID: <4DBDB3B0.1010307@cs.ucla.edu> Date: Sun, 01 May 2011 12:25:36 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.14) Gecko/20110223 Thunderbird/3.1.8 MIME-Version: 1.0 To: Andreas Schwab Subject: Re: bug#8601: * 2 -> * 4 typo fix in detect_coding_charset References: <4DBDA41D.1010008@cs.ucla.edu> In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 8601 Cc: 8601@debbugs.gnu.org, Miles Bader X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) On 05/01/11 12:06, Andreas Schwab wrote: > Except that a merge commit is never adequate for infering blame. See > e209e347 for the real source. OK, thanks, I'll CC: this to Kenichi Handa, who made the original change back on 2006-11-08 04:28:29 +0000 (revno 52413.1.1170 in the trunk). Kenichi, can you please take a look at ? Thanks. PS. Sorry, I don't know what "e209e347" means; is there some documentation for that notation? From debbugs-submit-bounces@debbugs.gnu.org Fri May 06 03:30:08 2011 Received: (at 8601-done) by debbugs.gnu.org; 6 May 2011 07:30:08 +0000 Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QIFUF-00031T-SM for submit@debbugs.gnu.org; Fri, 06 May 2011 03:30:08 -0400 Received: from smtp.cs.ucla.edu ([131.179.128.62]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QIFUC-00030V-8W; Fri, 06 May 2011 03:30:05 -0400 Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id AA3A539E8118; Fri, 6 May 2011 00:29:57 -0700 (PDT) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id nku4im7TOEsc; Fri, 6 May 2011 00:29:57 -0700 (PDT) Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id 2BCF039E8113; Fri, 6 May 2011 00:29:57 -0700 (PDT) Message-ID: <4DC3A374.1090401@cs.ucla.edu> Date: Fri, 06 May 2011 00:29:56 -0700 From: Paul Eggert Organization: UCLA Computer Science Department User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.17) Gecko/20110424 Thunderbird/3.1.10 MIME-Version: 1.0 To: 8545@debbugs.gnu.org, 8600-done@debbugs.gnu.org, 8601-done@debbugs.gnu.org, 8602-done@debbugs.gnu.org Subject: Merged fixes for 8600, 8601, 8602, and (partially) for 8545 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.0 (---) X-Debbugs-Envelope-To: 8601-done X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.0 (---) I committed to the Emacs trunk a merge (bzr 104134) that has fixes for the following bugs: * Bug#8600 - The fix removes the garbage element of code_space. * Bug#8601 - Here I assumed that the "* 2" is a typo. * Bug#8602 - This fixes some large-int-to-float screwups in the Lisp reader. * Bug#8545 - This fixes the bug where the code should have called va_copy, but didn't. Also, I changed a limit so that the MOST_POSITIVE_FIXNUM limit for strings applies to their length, i.e., does not include the null termination byte. Stefan hasn't had time to chime in, but if this last change turns out to be incorrect I will back it out. This merge doesn't entirely fix Bug#8545, so I'll leave that bug open; the others I'll close. From unknown Tue Jun 17 01:26:20 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Fri, 03 Jun 2011 11:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator