[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: |
Thu, 25 Aug 2011 18:49:52 +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) |
> > > (progn
> > > (goto-char (point-min))
> > > (insert #x80)
> > > (insert (make-string 16 ?A))
> > > (encode-coding-region 1 18 'ctext-unix))
> > >
> > > backtrace is below. Please let me know if you need more information.
> > >
> > >
> > > Program received signal SIGSEGV, Segmentation fault.
> > > 0x0000000000557419 in mark_object (arg=4702111234474983745) at
> > > alloc.c:5473
> > > 5473 if (STRING_MARKED_P (ptr))
> >
> > I think relocation of buffer may cause the problem.
> >
> > The comment for CODING_DECODE_CHAR macro in coding.c says as below.
> >
> > > /* This wrapper macro is used to preserve validity of pointers into
> > > buffer text across calls to decode_char, which could cause
> > > relocation of buffers if it loads a charset map, because loading a
> > > charset map allocates large structures. */
> >
> > encode_coding_iso_2022() uses ENCODE_ISO_CHARACTER macro, which uses
> > ENCODE_CHAR macro. ENCODE_CHAR macro calls encode_char() and it may
> > load a charset map.
>
> But which pointer(s) in encode_coding_iso_2022 can be altered by
> relocation?
encode_coding() sets coding->destination with coding_set_destination()
before calling encode_coding_iso_2022(). I think at least correct
value of coding->destination can change in encode_coding_iso_2022() by
loading charset maps.
> Do you actually see any of the pointers used by this
> function modified by relocation of some buffer?
No, beacuse I don't know how to see.
--
Kazuhiro Ito
- bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result on on Windows, Kazuhiro Ito, 2011/08/18
- 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, 2011/08/26
- 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