[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crash in titdic-convert with DOS line ends

From: Kenichi Handa
Subject: Re: Crash in titdic-convert with DOS line ends
Date: Tue, 05 Feb 2008 13:19:18 +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>, Jason Rumney <address@hidden> writes:

> Now that I am debugging this, ETZY.tit does not crash Emacs, while 
> 4Corner.tit does. It appears to be a problem with any DOS line ends in a 
> Big5 file that is inserted into a unibyte buffer, but some other 
> condition needs to be present to trigger the crash. But the following 
> shows that there is definitely a problem with DOS line ends in unibyte 
> buffers

> ;; Evaluate the following 2 forms in *scratch*. The first converts a 
> .tit file to DOS line ends, the second reads
> ;; it into a unibyte buffer as raw-text in the same way that 
> titdic-convert does.

> (with-temp-buffer
>   (let ((coding-system-for-read 'cn-big5)
>         (coding-system-for-write 'cn-big5-dos))
>     (insert-file-contents (expand-file-name "CXTERM-DIC/4Corner.tit" 
> (file-name-directory (locate-library "leim-list"))))
>     (write-file "/tmp/test.tit")))

> (set-buffer-multibyte nil)
> (let ((coding-system-for-read 'raw-text))
>   (insert-file-contents "/tmp/test.tit"))

> ;; If Emacs does not crash, note the ^M on the ends of some lines.

> When Emacs crashes, it always happens in decode_eol (several levels deep 
> from insert-file-contents),  on this line:

> if (*p == '\r' && p[1] == '\n')

Thank you for tracking down the problem to this point.  I've
just installed a fix.

Kenichi Handa

reply via email to

[Prev in Thread] Current Thread [Next in Thread]