all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@ni.aist.go.jp>
To: Jason Rumney <jasonr@gnu.org>
Cc: schwab@suse.de, emacs-devel@gnu.org
Subject: Re: Crash in titdic-convert with DOS line ends
Date: Tue, 05 Feb 2008 13:19:18 +0900	[thread overview]
Message-ID: <E1JMFHC-0006AC-OC@etlken.m17n.org> (raw)
In-Reply-To: <47A7BC76.4010703@gnu.org> (message from Jason Rumney on Tue, 05 Feb 2008 01:31:34 +0000)

In article <47A7BC76.4010703@gnu.org>, Jason Rumney <jasonr@gnu.org> 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
handa@ni.aist.go.jp




  reply	other threads:[~2008-02-05  4:19 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-02  1:08 make bootstrap fails on w32/MinGW Óscar Fuentes
2008-02-02  2:46 ` Jason Rumney
2008-02-02  4:24   ` Óscar Fuentes
2008-02-02 11:14   ` Eli Zaretskii
2008-02-02 16:10   ` Eli Zaretskii
2008-02-02 21:19     ` Jason Rumney
2008-02-02 22:16       ` Eli Zaretskii
2008-02-03 11:04     ` Lennart Borgman (gmail)
2008-02-03 19:42       ` Eli Zaretskii
2008-02-03 20:01         ` Eli Zaretskii
2008-02-03 23:11         ` Jason Rumney
2008-02-04 17:58           ` Lennart Borgman (gmail)
2008-02-04 18:05             ` Juanma Barranquero
2008-02-04 18:21               ` Lennart Borgman (gmail)
2008-02-04 19:28               ` Andreas Schwab
2008-02-04 20:15                 ` Juanma Barranquero
2008-02-04 20:58                   ` Stefan Monnier
2008-02-04 21:17                     ` Juanma Barranquero
2008-02-04 21:20                     ` Eli Zaretskii
2008-02-04 23:30                 ` Jason Rumney
2008-02-05  1:31                   ` Crash in titdic-convert with DOS line ends Jason Rumney
2008-02-05  4:19                     ` Kenichi Handa [this message]
2008-02-06 19:16               ` make bootstrap fails on w32/MinGW Lennart Borgman (gmail)
2008-02-06 19:44                 ` Eli Zaretskii
2008-02-06 19:55                   ` Lennart Borgman (gmail)
2008-02-06 21:41                     ` Eli Zaretskii
2008-02-06 21:59                       ` Lennart Borgman (gmail)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1JMFHC-0006AC-OC@etlken.m17n.org \
    --to=handa@ni.aist.go.jp \
    --cc=emacs-devel@gnu.org \
    --cc=jasonr@gnu.org \
    --cc=schwab@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.