From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel,gmane.emacs.pretest.bugs Subject: Re: Crashes with non-default language environments Date: Sun, 10 Feb 2008 20:39:45 -0500 Message-ID: References: <87y79wve9b.fsf@jurta.org> <87zlu96bp2.fsf@jurta.org> <87prv4l96f.fsf@jurta.org> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1202694401 29131 80.91.229.12 (11 Feb 2008 01:46:41 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2008 01:46:41 +0000 (UTC) Cc: emacs-pretest-bug@gnu.org To: Juri Linkov Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Feb 11 02:47:04 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1JONl8-0004O0-I3 for ged-emacs-devel@m.gmane.org; Mon, 11 Feb 2008 02:47:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JONkf-0002zq-AW for ged-emacs-devel@m.gmane.org; Sun, 10 Feb 2008 20:46:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JONkS-0002p3-Mb for emacs-devel@gnu.org; Sun, 10 Feb 2008 20:46:20 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JONkR-0002nr-Py for emacs-devel@gnu.org; Sun, 10 Feb 2008 20:46:20 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JONkR-0002ni-Kq for emacs-devel@gnu.org; Sun, 10 Feb 2008 20:46:19 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JONkR-00034y-Gn for emacs-devel@gnu.org; Sun, 10 Feb 2008 20:46:19 -0500 Original-Received: from mx10.gnu.org ([199.232.76.166]) by fencepost.gnu.org with esmtp (Exim 4.67) (envelope-from ) id 1JONkR-0004iu-1A for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 20:46:19 -0500 Original-Received: from Debian-exim by monty-python.gnu.org with spam-scanned (Exim 4.60) (envelope-from ) id 1JONkO-000346-7d for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 20:46:19 -0500 Original-Received: from ironport2-out.pppoe.ca ([206.248.154.182]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JONkN-00033h-UA for emacs-pretest-bug@gnu.org; Sun, 10 Feb 2008 20:46:16 -0500 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAB44r0dMCpK7/2dsb2JhbACmZ3s X-IronPort-AV: E=Sophos;i="4.25,331,1199682000"; d="scan'208";a="14009939" Original-Received: from smtp.pppoe.ca ([65.39.196.238]) by ironport2-out.pppoe.ca with ESMTP; 10 Feb 2008 20:46:14 -0500 Original-Received: from ceviche.home ([76.10.146.187]) by smtp.pppoe.ca (Internet Mail Server v1.0) with ESMTP id RDF76514 for ; Sun, 10 Feb 2008 20:46:14 -0500 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0C14AB422D; Sun, 10 Feb 2008 20:39:45 -0500 (EST) In-Reply-To: <87prv4l96f.fsf@jurta.org> (Juri Linkov's message of "Mon, 11 Feb 2008 00:48:40 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.50 (gnu/linux) X-detected-kernel: by monty-python.gnu.org: Genre and OS details not recognized. X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:88703 gmane.emacs.pretest.bugs:21010 Archived-At: >>> This crash is caused by the corrupt byte-code produced by >>> `byte-compile-lapcode'. `string-make-unibyte' at the end of this >>> function produces different bytecode strings in different >>> language environments. This problem can be narrowed down to: >> >> Shouldn't it be string-to-unibyte instead? > I've just checked that `string-as-unibyte' produces even worse results > than `string-make-unibyte'. It replaces every byte in the original > string with 2-byte sequences. Of course, string-AS-unibyte is the worst of all three. But nobody suggested to use that one. I just suggested to replace string-MAKE-uniybte by string-TO-unibyte. string-TO-unibyte ~= (encode-coding-string STR 'binary) string-AS-unibyte ~= (encode-coding-string STR 'emacs-internal) (unicode or emacs-mule, depending on the Emacs version) string-MAKE-unibyte ~= (encode-coding-string STR locale-coding-system) Stefan