Yoshiki Hayashi <t90553(a)mail.ecc.u-tokyo.ac.jp> writes:
This bug happens with only CVS version of XEmacs
21.2.19. XEmacs 21.1.7 and plain XEmacs 21.2.19 is fine.
Save the following file as test and type C-x C-f test RET
then, XEmacs dumps core.
I've got no reply, so I tried to fix it myself. ;-)
The bug is in determine_real_coding_system. It doesn't handle
8bit character correctly. Although I have not fixed the real
bug, I fixed some bug with this patch and it makes XEmacs
crashes less often.
What this patch fix is:
1. Search if -*- exists.
2. Stop searching at the first \r or \n
3. Don't treat encoding: or .*coding: as 'coding: cookie'
The problems left are:
1. It doesn't check if closing -*- exists or not.
2. EOL detection is not working well when you don't specifiy
it explicitly. (i.e. coding: iso-2022-jp assumes LF as EOL char.)
3. It doesn't fix crash. You can still crash it with files
like this.
1999-10-26 Yoshiki Hayashi <t90553(a)mail.ecc.u-tokyo.ac.jp>
* file-coding.c (determine_real_coding_system): Check if
'-*-' exists. End searching for coding: cookie at the end
of line. Check whether character before coding: is space,
tab or ';'.
;;; -*- mode: emacs-lisp; syntax: elisp; coding: ß -*-
--
Yoshiki Hayashi