From dianchengwang@gmail.com Sun Jan 11 18:51:26 2009 Received: (at submit) by emacsbugs.donarmstrong.com; 12 Jan 2009 02:51:26 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: * X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=1.0 required=4.0 tests=IMPRONONCABLE_2 autolearn=no version=3.2.5-bugs.debian.org_2005_01_02 Received: from fencepost.gnu.org (fencepost.gnu.org [140.186.70.10]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0C2pMmv023724 for ; Sun, 11 Jan 2009 18:51:24 -0800 Received: from mail.gnu.org ([199.232.76.166]:42372 helo=mx10.gnu.org) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1LMCsO-0006gU-OK for emacs-pretest-bug@gnu.org; Sun, 11 Jan 2009 21:50:04 -0500 Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1LMCtZ-0007Ek-VM for emacs-pretest-bug@gnu.org; Sun, 11 Jan 2009 21:51:22 -0500 Received: from ti-out-0910.google.com ([209.85.142.191]:37275) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1LMCtZ-0007EC-6h; Sun, 11 Jan 2009 21:51:17 -0500 Received: by ti-out-0910.google.com with SMTP id u5so9026691tia.10 for ; Sun, 11 Jan 2009 18:51:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:mime-version:content-type; bh=Ctxf1B74MZbUrn/DiHicSP8aMJnQY/QAWfaD625qaYI=; b=ffN3xzt2O5BQ88GyLDycKMP6RMOq/SyhNUi3r4yxG/VpM2Bea2FMON8UtIm9zEv4/l Os9SH089SD+75uiYX0n5vAlpmFi/ehJXrDx1REP+HmfbbLcgEbUsM4wNEnv9qy8QgXpu u9EbbnjqsBtpTkMqTRjaRbCfFgvsWQ4mFy/C0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:mime-version:content-type; b=EPpCJxikEfmLaWVW3jqU0zDOQ9HVe79jb8NFc1XnE+dyw46/bbZrLwMxVlcDKtIJE9 L4ZnhIplC+GnzGI3Lu1jDVAC2hnvUwbtpL8hxqzw8hGP/gJx+77TjLO0JAfCszlaJyra N52Tsz0rmM7uYH7dNfDft+LgJUnfAxBnU/VZU= Received: by 10.110.2.2 with SMTP id 2mr2395620tib.29.1231728674767; Sun, 11 Jan 2009 18:51:14 -0800 (PST) Received: from localhost ([124.16.138.52]) by mx.google.com with ESMTPS id 22sm8339537tim.15.2009.01.11.18.51.12 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 11 Jan 2009 18:51:13 -0800 (PST) From: Wang Diancheng To: emacs-pretest-bug@gnu.org Cc: emacs-devel@gnu.org Subject: 23.0.60; detect attached file coding system, make emacs crash. Date: Mon, 12 Jan 2009 10:51:18 +0800 Message-ID: <877i51fd95.fsf@redflag-linux.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) --=-=-= detect attached file coding system with following code, make emacs crash (with-temp-buffer (insert-file-contents "/home/dcwang/1.txt") (detect-coding-region (point-min) (point-max) t)) bt full (top 10 frames): #0 detect_coding_utf_16 (coding=0xbfed10b0, detect_info=0xbfed11a0) at coding.c:1622 e = '\0' , "\001", '\0' , "\001\000\000\001\000\000\000\000\000\000\000\000\001\000\001", '\0' o = '\0' , "\001", '\0' , "\001\000\000\001\000\000\000\000\001\000\000\000\001\000\001", '\0' e_num = 5 o_num = 7 src = ( const unsigned char *) 0x8d78fe9 "\ninfo-title=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-album=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-tracknumber=1\ninfo-year=0\ninfo-genre=*\340\245\213\ninfo-note=\ninfo-playing-time=1379\n" src_end = (const unsigned char *) 0x8d79079 "" multibytep = 1 c1 = -2406 c2 = -1572940 #1 0x080b29bc in detect_coding_system ( src=0x8d78fd0 "info-artist=\340\244\222\340\244\244\340\245\246\366\200\201\214\ninfo-title=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-album=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-tracknumber=1\ninfo-year=0\ninfo-genre=*\340\245\213\ninfo-note=\ninfo-playing-time=1379\n", src_chars=136, src_bytes=169, highest=1, multibytep=1, coding_system=137943241) at coding.c:7847 category = this = (struct coding_system *) 0x8345f30 c = i = 12 src_end = (const unsigned char *) 0x8d79079 "" attrs = eol_type = 138073060 val = 137943241 coding = { id = 4, common_flags = 5120, mode = 2, spec = { iso_2022 = { flags = 135436798, current_invocation = {-1, 169}, current_designation = {136, 136, 136, 0}, single_shifting = -1074982680, bol = 0 }, ccl = 0x81299fe, utf_16 = { bom = 135436798, endian = 4294967295, surrogate = 169 }, utf_8_bom = 135436798, emacs_mule_full_support = 135436798 }, max_charset_id = 0, safe_charsets = 0x838faec "", src_multibyte = 1, dst_multibyte = 0, head_ascii = 12, produced = 148344260, produced_char = 148346784, consumed = 0, consumed_char = 1, errors = 2136, error_positions = 0x8d78dc4, result = CODING_RESULT_INVALID_SRC, src_pos = 0, src_pos_byte = -1075130800, src_chars = 136, src_bytes = 169, src_object = 1, source = 0x8d78fd0 "info-artist=\340\244\222\340\244\244\340\245\246\366\200\201\214\ninfo-title=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-album=\340\244\222\340\244\244\340\245\246\366\200\201\214900\340\245\213\ninfo-tracknumber=1\ninfo-year=0\ninfo-genre=*\340\245\213\ninfo-note=\ninfo-playing-time=1379\n", dst_pos = 14525, dst_pos_byte = 0, dst_bytes = 29, dst_object = 0, destination = 0x1
, chars_at_source = 0, charbuf = 0x83bb0e9, charbuf_size = 1376529752, charbuf_used = 1511, annotated = 149, carryover = "+\320\327\b(\320\327\b\371\3308\bx\021\355\277R\f\030\b\371\3308\b \000\000\000p\202\n\b\340\276\n\b\004\000\000\000\371\3308\b\370\021\355\277X!\031\b\371\3308\b\244\201\000\000\001\000\000", carryover_bytes = 1000, default_char = 0, detector = 0, decoder = 0x80a7640 , encoder = 0x80b78b0 } id = detect_info = { checked = 294911, found = 0, rejected = 3328 } null_byte_found = 0 eight_bit_found = #2 0x080b2dfc in Fdetect_coding_region (start=8, end=1096, highest=137943289) at coding.c:8058 from = 1 to = 137 from_byte = 1 to_byte = 169 #3 0x081923c4 in Feval (form=148944845) at eval.c:2381 numargs = argvals = {8, 1096, 137943289, 137943241, 137943241, 148361211, 7, 7} args_left = 137943241 i = 3 fun = val = original_fun = original_args = 148944861 funcar = backtrace = { next = 0xbfed12e0, function = 0xbfed1268, args = 0xbfed1230, nargs = 3, evalargs = 1 '\001', debug_on_exit = 0 '\0' } #4 0x0819268f in Fprogn (args=4) at eval.c:449 val = -1074982824 #5 0x0819249b in Feval (form=148942909) at eval.c:2322 numargs = 4 argvals = {2, 138158929, -1074982168, 135793746, 138157906, 148943085, 4, 1} args_left = 148942885 i = fun = val = original_fun = original_args = 148942885 funcar = backtrace = { next = 0xbfed1380, function = 0xbfed12f8, args = 0xbfed12f4, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #6 0x08192ad2 in Funwind_protect (args=148942981) at eval.c:1353 val = #7 0x0819249b in Feval (form=148942989) at eval.c:2322 numargs = 4 argvals = {148344260, 136426564, 10, 145607856, 4, 0, 1, 136426564} args_left = 148942981 i = fun = val = original_fun = original_args = 148942981 funcar = backtrace = { next = 0xbfed1430, function = 0xbfed1398, args = 0xbfed1394, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } #8 0x0819268f in Fprogn (args=4) at eval.c:449 val = -1074982824 #9 0x08185b86 in Fsave_current_buffer (args=148943085) at editfns.c:1023 val = #10 0x0819249b in Feval (form=148943093) at eval.c:2322 numargs = 4 argvals = {136426564, 148663201, 148942989, 135863493, 148943005, 148942901, 148943013, 148663201} args_left = 148943085 i = fun = val = original_fun = original_args = 148943085 funcar = backtrace = { next = 0xbfed14b0, function = 0xbfed1448, args = 0xbfed1444, nargs = -1, evalargs = 0 '\0', debug_on_exit = 0 '\0' } xbacktrace: "detect-coding-region" (0xbfed1230) "progn" (0xbfed12f4) "unwind-protect" (0xbfed1394) "save-current-buffer" (0xbfed1444) "with-current-buffer" (0xbfed14c4) "let" (0xbfed15a4) "with-temp-buffer" (0xbfed1624) "eval" (0xbfed16c8) "eval-last-sexp-1" (0xbfed17f4) "eval-last-sexp" (0xbfed1974) "call-interactively" (0xbfed1b34) --=-=-= Content-Disposition: attachment; filename=1.txt Content-Transfer-Encoding: 8bit info-artist=ऒत० info-title=ऒत०900ो info-album=ऒत०900ो info-tracknumber=1 info-year=0 info-genre=*ो info-note= info-playing-time=1379 --=-=-=-- From cyd@stupidchicken.com Tue Jan 13 19:54:15 2009 Received: (at 1864) by emacsbugs.donarmstrong.com; 14 Jan 2009 03:54:15 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=MURPHY_DRUGS_REL8 autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0E3sDVi026719 for <1864@emacsbugs.donarmstrong.com>; Tue, 13 Jan 2009 19:54:14 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 06E1157E211; Tue, 13 Jan 2009 22:54:29 -0500 (EST) From: Chong Yidong To: Kenichi Handa Cc: Wang Diancheng , 1864@debbugs.gnu.org Subject: Re: 23.0.60; detect attached file coding system, make emacs crash. Date: Tue, 13 Jan 2009 22:54:29 -0500 Message-ID: <87priq8ruy.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii > detect attached file coding system with following code, make emacs crash > > (with-temp-buffer > (insert-file-contents "/home/dcwang/1.txt") > (detect-coding-region (point-min) (point-max) t)) Looks like detect_coding_utf_16 forgets to check for negative values of ONE_MORE_BYTE. Handa-san, could you check the following patch? *** trunk/src/coding.c.~1.406.~ 2009-01-11 08:23:34.000000000 -0500 --- trunk/src/coding.c 2009-01-13 22:54:10.000000000 -0500 *************** *** 1612,1617 **** --- 1612,1621 ---- { ONE_MORE_BYTE (c1); ONE_MORE_BYTE (c2); + + if (c1 < 0 || c2 < 0) + break; + if (! e[c1]) { e[c1] = 1; From lekktu@gmail.com Wed Jan 14 00:44:42 2009 Received: (at 1864) by emacsbugs.donarmstrong.com; 14 Jan 2009 08:44:43 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=-3.0 required=4.0 tests=HAS_BUG_NUMBER autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.26]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0E8iYiM002720 for <1864@emacsbugs.donarmstrong.com>; Wed, 14 Jan 2009 00:44:36 -0800 Received: by ey-out-2122.google.com with SMTP id 4so50063eyf.13 for <1864@emacsbugs.donarmstrong.com>; Wed, 14 Jan 2009 00:44:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=TQ7xT1HBjagw2Sxv7AHeOKoehyzBgYmzk5kyW20dXHQ=; b=cpDrG38r/ieFfHYal2zuXQ7HDYLjg4btH4hN+4cQ0IrFc/JFL/pXXXDIpSPRkcSkmi tK8Aho0SrwEVH3EM6YzooRqYP/+oHjefBsVlOs9bN6am26W8GAkaGljKdBKYBTBFp50j Xq6R+eIITgX68tLjSaokSoLC6odF1kqCH7ToA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=hj+06838BWiU90lPo7Z59Lre+wS7Q7jcfLjWJwZg9RXZgE7hbKcRj3bpionwGs1Mvx xlRKegnaNMW8ZghybKReuk0DUZyD4kPwV6Gr8nrEiTaMvYOj5Tj2ov4XroW1uUBf9ett 6X81rVUV+Qsgtkkd6ZxTjTsJMUPkV4To+x10Q= Received: by 10.210.67.4 with SMTP id p4mr1669055eba.193.1231922674376; Wed, 14 Jan 2009 00:44:34 -0800 (PST) Received: by 10.210.141.18 with HTTP; Wed, 14 Jan 2009 00:44:34 -0800 (PST) Message-ID: Date: Wed, 14 Jan 2009 09:44:34 +0100 From: "Juanma Barranquero" To: "Chong Yidong" Subject: Re: bug#1864: 23.0.60; detect attached file coding system, make emacs crash. Cc: 1864@debbugs.gnu.org, "Kenichi Handa" , "Wang Diancheng" In-Reply-To: <87priq8ruy.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <87priq8ruy.fsf@cyd.mit.edu> On Wed, Jan 14, 2009 at 04:54, Chong Yidong wrote: > *** 1612,1617 **** > --- 1612,1621 ---- > { > ONE_MORE_BYTE (c1); > ONE_MORE_BYTE (c2); > + > + if (c1 < 0 || c2 < 0) > + break; > + > if (! e[c1]) > { > e[c1] = 1; Don't you need a test also before lines 1605-1606, where c1 and c2 are used as array indexes? Juanma From cyd@stupidchicken.com Wed Jan 14 05:33:50 2009 Received: (at control) by emacsbugs.donarmstrong.com; 14 Jan 2009 13:33:50 +0000 X-Spam-Checker-Version: SpamAssassin 3.2.5-bugs.debian.org_2005_01_02 (2008-06-10) on rzlab.ucr.edu X-Spam-Level: X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. X-Spam-Status: No, score=0.0 required=4.0 tests=none autolearn=ham version=3.2.5-bugs.debian.org_2005_01_02 Received: from cyd.mit.edu (CYD.MIT.EDU [18.115.2.24]) by rzlab.ucr.edu (8.13.8/8.13.8/Debian-3) with ESMTP id n0EDXiIf011626 for ; Wed, 14 Jan 2009 05:33:45 -0800 Received: by cyd.mit.edu (Postfix, from userid 1000) id 2F68057E1D7; Wed, 14 Jan 2009 08:34:01 -0500 (EST) From: Chong Yidong To: control@debbugs.gnu.org Subject: close bug Date: Wed, 14 Jan 2009 08:34:01 -0500 Message-ID: <878wpeui46.fsf@cyd.mit.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii merge 1864,1900 close 1864 close 1900 thanks From unknown Sat Jun 21 03:31:05 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: $requester Subject: Internal Control Message-Id: bug archived. Date: Wed, 11 Feb 2009 15:24:08 +0000 User-Agent: Fakemail v42.6.9 # A New Hope # A log time ago, in a galaxy far, far away # something happened. # # Magically this resulted in the following # action being taken, but this fake control # message doesn't tell you why it happened # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator