[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Crashes with non-default language environments
From: |
Kenichi Handa |
Subject: |
Re: Crashes with non-default language environments |
Date: |
Tue, 12 Feb 2008 20:23:52 +0900 |
User-agent: |
SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/23.0.60 (i686-pc-linux-gnu) MULE/6.0 (HANACHIRUSATO) |
In article <address@hidden>, Juri Linkov <address@hidden> writes:
>>> 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.
> The change to use `string-as-unibyte' came from the Unicode branch:
> 2008-02-02 Kenichi Handa <address@hidden>
> * emacs-lisp/bytecomp.el (byte-compile-lapcode): Be sure to
> return a unibyte string.
> Maybe, this change is correct, but the bug is in the definition of the
> language environment, I can't say for sure. Comparing results of calling
> `string-make-unibyte' on 256 bytes in different language environments
> gives only 6 differences:
It was my fault. I've just installed this change. Could
you please try with the latest code?
Index: bytecomp.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/bytecomp.el,v
retrieving revision 2.229
retrieving revision 2.230
diff -u -r2.229 -r2.230
--- bytecomp.el 1 Feb 2008 16:01:26 -0000 2.229
+++ bytecomp.el 12 Feb 2008 11:21:31 -0000 2.230
@@ -864,7 +864,7 @@
(setcar (cdr bytes) (logand pc 255))
(setcar bytes (lsh pc -8))))
(setq patchlist (cdr patchlist))))
- (string-make-unibyte (concat (nreverse bytes)))))
+ (apply 'unibyte-string (nreverse bytes))))
;;; compile-time evaluation
---
Kenichi Handa
address@hidden
- Re: Crashes with non-default language environments, (continued)
- Re: Crashes with non-default language environments, Stefan Monnier, 2008/02/10
- Re: Crashes with non-default language environments, Miles Bader, 2008/02/10
- Re: Crashes with non-default language environments, Stefan Monnier, 2008/02/10
- Re: Crashes with non-default language environments, Miles Bader, 2008/02/10
- Re: Crashes with non-default language environments, Stefan Monnier, 2008/02/11
- Re: Crashes with non-default language environments, Miles Bader, 2008/02/11
- Re: Crashes with non-default language environments, Stefan Monnier, 2008/02/11
- Re: Crashes with non-default language environments, Juri Linkov, 2008/02/11
- Re: Crashes with non-default language environments, Kenichi Handa, 2008/02/12
- Re: Crashes with non-default language environments, Stefan Monnier, 2008/02/12
- Re: Crashes with non-default language environments,
Kenichi Handa <=
- Re: Crashes with non-default language environments, Juri Linkov, 2008/02/12