From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andreas Schwab Newsgroups: gmane.emacs.bugs Subject: bug#18610: 24.4.50; Specific file causing emacs to segfault upon opening Date: Fri, 03 Oct 2014 18:02:52 +0200 Message-ID: <87a95d9m4z.fsf@igel.home> References: <87eguqbk5m.fsf@gmail.com> <87iok2iio2.fsf@geodiff-mac3.ulb.ac.be> <83egupin8y.fsf@gnu.org> <542E86E4.2030205@yandex.ru> <83a95dibtt.fsf@gnu.org> <837g0hiaza.fsf@gnu.org> <87egup9oac.fsf@igel.home> <834mvli2xu.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1412352205 30675 80.91.229.3 (3 Oct 2014 16:03:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 3 Oct 2014 16:03:25 +0000 (UTC) Cc: dmantipov@yandex.ru, maden.ldm@gmail.com, 18610@debbugs.gnu.org To: Eli Zaretskii Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Oct 03 18:03:17 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xa5K7-0002GM-DZ for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 18:03:15 +0200 Original-Received: from localhost ([::1]:40063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa5K6-000167-WE for geb-bug-gnu-emacs@m.gmane.org; Fri, 03 Oct 2014 12:03:15 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33446) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa5K0-000160-CD for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 12:03:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xa5Jv-00010n-BY for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 12:03:08 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40687) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xa5Jv-00010d-8o for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 12:03:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xa5Ju-0005EH-Gf for bug-gnu-emacs@gnu.org; Fri, 03 Oct 2014 12:03:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Andreas Schwab Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 03 Oct 2014 16:03:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18610 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18610-submit@debbugs.gnu.org id=B18610.141235218120092 (code B ref 18610); Fri, 03 Oct 2014 16:03:02 +0000 Original-Received: (at 18610) by debbugs.gnu.org; 3 Oct 2014 16:03:01 +0000 Original-Received: from localhost ([127.0.0.1]:60484 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa5Js-0005Dx-T4 for submit@debbugs.gnu.org; Fri, 03 Oct 2014 12:03:01 -0400 Original-Received: from mail-out.m-online.net ([212.18.0.9]:34723) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xa5Jq-0005Di-TU for 18610@debbugs.gnu.org; Fri, 03 Oct 2014 12:02:59 -0400 Original-Received: from frontend01.mail.m-online.net (unknown [192.168.8.182]) by mail-out.m-online.net (Postfix) with ESMTP id 3j8bZn4SJWz3hj6m; Fri, 3 Oct 2014 18:02:57 +0200 (CEST) Original-Received: from localhost (dynscan1.mnet-online.de [192.168.6.68]) by mail.m-online.net (Postfix) with ESMTP id 3j8bZn2cfgzvh2Y; Fri, 3 Oct 2014 18:02:57 +0200 (CEST) X-Virus-Scanned: amavisd-new at mnet-online.de Original-Received: from mail.mnet-online.de ([192.168.8.182]) by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavisd-new, port 10024) with ESMTP id c3FNo5Go7PQH; Fri, 3 Oct 2014 18:02:52 +0200 (CEST) X-Auth-Info: tpDxtwUCcGtnha/q0b5D8icgoNewG+KUcOwyeeDN1ldrowoQ+sGJYF6HujA+7zA3 Original-Received: from igel.home (ppp-188-174-153-54.dynamic.mnet-online.de [188.174.153.54]) by mail.mnet-online.de (Postfix) with ESMTPA; Fri, 3 Oct 2014 18:02:52 +0200 (CEST) Original-Received: by igel.home (Postfix, from userid 1000) id 2DD952C0C66; Fri, 3 Oct 2014 18:02:52 +0200 (CEST) X-Yow: In Newark the laundromats are open 24 hours a day! In-Reply-To: <834mvli2xu.fsf@gnu.org> (Eli Zaretskii's message of "Fri, 03 Oct 2014 18:32:45 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.94 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94098 Archived-At: Eli Zaretskii writes: >> From: Andreas Schwab >> Cc: Kenichi Handa , dmantipov@yandex.ru, maden.ldm@gmail.com, 18610@debbugs.gnu.org >> Date: Fri, 03 Oct 2014 17:16:27 +0200 >> >> Eli Zaretskii writes: >> >> > Btw, there's one more issue that bothers me. In ONE_MORE_BYTE we have >> > this: >> > >> > c = *src++; \ >> > if (multibytep && (c & 0x80)) \ >> > { \ >> > if ((c & 0xFE) == 0xC0) \ >> > c = ((c & 1) << 6) | *src++; \ >> > else \ >> > { \ >> > src--; \ >> > c = - string_char (src, &src, NULL); \ >> > record_conversion_result \ >> > (coding, CODING_RESULT_INVALID_SRC); \ >> > } \ >> > } \ >> > >> > If 'src' is a signed type >> >> It never is. > > You are right. But c nevertheless does get assigned a negative value > when the byte at src is beyond 127, at least according to what GDB > shows me. Exactly here: c = - string_char (src, &src, NULL); 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."