GNU bug report logs -
#17881
24.4.50; decoding by emacs-mule hangs up
Previous Next
Reported by: Katsumi Yamaoka <yamaoka <at> jpl.org>
Date: Mon, 30 Jun 2014 09:23:02 UTC
Severity: normal
Found in version 24.4.50
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 17881 in the body.
You can then email your comments to 17881 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Mon, 30 Jun 2014 09:23:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Katsumi Yamaoka <yamaoka <at> jpl.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Mon, 30 Jun 2014 09:23:03 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
Hi,
Recently an old program that uses the `emacs-mule' coding system
hangs up. Encoding seems ok, but decoding doesn't seem to return.
To reproduce this, please try:
(decode-coding-string "\222\244\242" 'emacs-mule)
This should return the Japanese letter "あ".
(Worse, killing the Emacs process is the only way to stop it on
Cygwin because of bug#14553 -- "C-g doesn't break inf-loop".)
Thanks.
In GNU Emacs 24.4.50.1 (i686-pc-cygwin, GTK+ Version 3.10.7)
of 2014-06-30 on localhost
Repository revision: 117445 michael.albinus <at> gmx.de-20140629183235-mpcng7hg27v7yryn
Windowing system distributor `The Cygwin/X Project', version 11.0.11501000
Configured using:
`configure --verbose --with-x-toolkit=gtk3'
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Mon, 30 Jun 2014 10:11:02 GMT)
Full text and
rfc822 format available.
Message #8 received at 17881 <at> debbugs.gnu.org (full text, mbox):
On 06/30/2014 12:27 PM, Katsumi Yamaoka wrote:
> Recently an old program that uses the `emacs-mule' coding system
> hangs up. Encoding seems ok, but decoding doesn't seem to return.
> To reproduce this, please try:
>
> (decode-coding-string "\222\244\242" 'emacs-mule)
>
> This should return the Japanese letter "あ".
> (Worse, killing the Emacs process is the only way to stop it on
> Cygwin because of bug#14553 -- "C-g doesn't break inf-loop".)
Quick bisection shows that this was introduced in r117432.
Dmitry
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Mon, 30 Jun 2014 15:42:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 17881 <at> debbugs.gnu.org (full text, mbox):
> Date: Mon, 30 Jun 2014 14:10:25 +0400
> From: Dmitry Antipov <dmantipov <at> yandex.ru>
> Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>
>
> On 06/30/2014 12:27 PM, Katsumi Yamaoka wrote:
>
> > Recently an old program that uses the `emacs-mule' coding system
> > hangs up. Encoding seems ok, but decoding doesn't seem to return.
> > To reproduce this, please try:
> >
> > (decode-coding-string "\222\244\242" 'emacs-mule)
> >
> > This should return the Japanese letter "あ".
> > (Worse, killing the Emacs process is the only way to stop it on
> > Cygwin because of bug#14553 -- "C-g doesn't break inf-loop".)
>
> Quick bisection shows that this was introduced in r117432.
Fixed in trunk revision 117451.
bug closed, send any further explanations to
17881 <at> debbugs.gnu.org and Katsumi Yamaoka <yamaoka <at> jpl.org>
Request was from
Glenn Morris <rgm <at> gnu.org>
to
control <at> debbugs.gnu.org
.
(Mon, 30 Jun 2014 18:34:03 GMT)
Full text and
rfc822 format available.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Mon, 30 Jun 2014 22:23:02 GMT)
Full text and
rfc822 format available.
Message #16 received at 17881 <at> debbugs.gnu.org (full text, mbox):
On Mon, 30 Jun 2014 18:40:41 +0300, Eli Zaretskii <eliz <at> gnu.org> wrote:
>> Date: Mon, 30 Jun 2014 14:10:25 +0400
>> From: Dmitry Antipov <dmantipov <at> yandex.ru>
>> Cc: Katsumi Yamaoka <yamaoka <at> jpl.org>
>>
>> On 06/30/2014 12:27 PM, Katsumi Yamaoka wrote:
>>
>>> Recently an old program that uses the `emacs-mule' coding system
>>> hangs up. Encoding seems ok, but decoding doesn't seem to return.
>>> To reproduce this, please try:
>>>
>>> (decode-coding-string "\222\244\242" 'emacs-mule)
>>>
>>> This should return the Japanese letter "あ".
>>> (Worse, killing the Emacs process is the only way to stop it on
>>> Cygwin because of bug#14553 -- "C-g doesn't break inf-loop".)
>>
>> Quick bisection shows that this was introduced in r117432.
> Fixed in trunk revision 117451.
The old program in question now works. Thank you!
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Tue, 01 Jul 2014 15:46:02 GMT)
Full text and
rfc822 format available.
Message #19 received at 17881 <at> debbugs.gnu.org (full text, mbox):
In article <83wqby4d8m.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> writes:
> Fixed in trunk revision 117451.
Thank you for the quick fix!
But, considering the usage of coding->charbuf, I think the
following fix is better. It always allocates 16 units more
in coding->charbuf. So, as far as it doesn't reach
MAX_CHARBUF_SIZE, decoding routines never stop by
insufficient coding->charbuf. I'm going to install it as
soon as I finish several tests.
=== modified file 'src/coding.c'
--- src/coding.c 2014-06-28 13:38:36 +0000
+++ src/coding.c 2014-07-01 15:27:35 +0000
@@ -7266,13 +7266,17 @@
}
#define MAX_CHARBUF_SIZE 0x4000
-#define MIN_CHARBUF_SIZE 0x10
+/* How many units decoding functions expect in coding->charbuf at
+ most. Currently, decode_coding_emacs_mule expects the following
+ size, and that is the largest value. */
+#define MAX_CHARBUF_EXTRA_SIZE ((MAX_ANNOTATION_LENGTH * 3) + 1)
#define ALLOC_CONVERSION_WORK_AREA(coding, size) \
do { \
- int units = ((size) > MAX_CHARBUF_SIZE ? MAX_CHARBUF_SIZE \
- : (size) < MIN_CHARBUF_SIZE ? MIN_CHARBUF_SIZE \
- : size); \
+ int units = (size) + MAX_CHARBUF_EXTRA_SIZE; \
+ \
+ if (units > MAX_CHARBUF_SIZE) \
+ units = MAX_CHARBUF_SIZE; \
coding->charbuf = SAFE_ALLOCA ((units) * sizeof (int)); \
coding->charbuf_size = (units); \
} while (0)
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Tue, 01 Jul 2014 15:51:01 GMT)
Full text and
rfc822 format available.
Message #22 received at 17881 <at> debbugs.gnu.org (full text, mbox):
> From: handa <at> gnu.org (K. Handa)
> Cc: dmantipov <at> yandex.ru, 17881 <at> debbugs.gnu.org, yamaoka <at> jpl.org
> Date: Wed, 02 Jul 2014 00:44:59 +0900
>
> In article <83wqby4d8m.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> writes:
>
> > Fixed in trunk revision 117451.
>
> Thank you for the quick fix!
> But, considering the usage of coding->charbuf, I think the
> following fix is better. It always allocates 16 units more
> in coding->charbuf. So, as far as it doesn't reach
> MAX_CHARBUF_SIZE, decoding routines never stop by
> insufficient coding->charbuf. I'm going to install it as
> soon as I finish several tests.
Thanks.
Information forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#17881
; Package
emacs
.
(Sat, 05 Jul 2014 14:15:02 GMT)
Full text and
rfc822 format available.
Message #25 received at 17881 <at> debbugs.gnu.org (full text, mbox):
In article <87tx71dqx0.fsf <at> gnu.org>, handa <at> gnu.org (K. Handa) writes:
> In article <83wqby4d8m.fsf <at> gnu.org>, Eli Zaretskii <eliz <at> gnu.org> writes:
> > Fixed in trunk revision 117451.
> Thank you for the quick fix!
> But, considering the usage of coding->charbuf, I think the
> following fix is better. It always allocates 16 units more
> in coding->charbuf. So, as far as it doesn't reach
> MAX_CHARBUF_SIZE, decoding routines never stop by
> insufficient coding->charbuf. I'm going to install it as
> soon as I finish several tests.
I've just committed that change to the trunk.
---
Kenichi Handa
handa <at> gnu.org
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Sun, 03 Aug 2014 11:24:04 GMT)
Full text and
rfc822 format available.
This bug report was last modified 9 years and 291 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.