[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#9318: 23.3.50; The first call of encode-coding-region() returns wron
From: |
Kazuhiro Ito |
Subject: |
bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result |
Date: |
Fri, 26 Aug 2011 20:41:57 +0900 |
User-agent: |
Wanderlust/2.15.9 (Almost Unreal) SEMI-EPG/1.14.6 (Maruoka) FLIM/1.14.9 (Gojō) APEL/10.8 EasyPG/1.0.0 Emacs/23.3.50 (i386-mingw-nt6.1.7601) MULE/6.0 (HANACHIRUSATO) |
> > > I think relocation of buffer may cause the problem.
> >
> > Does that help?
>
> Andreas' patch resolved the problem partially. It resolved the problem on
> NetBSD with '-O0' CFLAGS, but failed on NetBSD with '-O2' and Windows.
>
> I confirmed that adding the protection of coding->dst_object to
> Andreas' patch resolved the problem on NetBSD with '-O2' but not on
> Windows. I don't know whether it is incorrect way or is not enough.
I noticed char_charset() could cause relocation of buffers because it
could call encode_char(). I confirmed similar changes to callers of
char_charset() fixed my problem (without the protection of
coding->dst_object).
SUMMARY OF THE PROBLEM:
In encode_coding_XXX(), calling encode_char() could cause relocation
of buffers. char_charset(), ENCODE_ISO_CHARACTER and ENCODE_CHAR
could also cause relocation because they could call encode_char().
After using of them, coding->destination, dst, dst_end should be
updated as needed.
--
Kazuhiro Ito
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result on on Windows, (continued)
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result on on Windows, Andreas Schwab, 2011/08/18
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Kazuhiro Ito, 2011/08/19
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Chong Yidong, 2011/08/20
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Andreas Schwab, 2011/08/24
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Kazuhiro Ito, 2011/08/25
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result,
Kazuhiro Ito <=
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Kazuhiro Ito, 2011/08/27
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result, Kazuhiro Ito, 2011/08/30