* [BUG] coding.c/decode_coding_iso2022
@ 2003-08-14 17:31 David Abrahams
2003-08-14 17:38 ` David Abrahams
2003-08-15 0:42 ` Kenichi Handa
0 siblings, 2 replies; 5+ messages in thread
From: David Abrahams @ 2003-08-14 17:31 UTC (permalink / raw)
Tired of the numerous crashes I've been getting under NT, I
recompiled emacs with all the runtime checks enabled. I think I'll
be posting lots of reports.
The title function uses variable c2 uninitialized during this phase
of the make process:
Loading language/devanagari (source)...
The stack trace is:
ntdll.dll!77f75a58()
temacs.exe!failwithmessage(void * retaddr=0x011b5c7f, int crttype=0x00000001, int errnum=0x00000003, const char * msg=0x0111431e) + 0x106 C++
temacs.exe!_RTC_UninitUse(const char * varname=0x01114900) + 0x9c C++
> temacs.exe!decode_coding_iso2022() Line 2169 + 0x33c C
temacs.exe!decode_coding(coding_system * coding=0x0081f1e4, const unsigned char * source=0x0158da80, unsigned char * destination=0x0158d2b0, int src_bytes=0x000006b7, int dst_bytes=0x00000000) Line 4873 + 0x19 C
temacs.exe!code_convert_region(int from=0x00000001, int from_byte=0x00000001, int to=0x000006b8, int to_byte=0x000006b8, coding_system * coding=0x0081f1e4, int encodep=0x00000000, int replace=0x00000000) Line 5705 + 0x17 C
temacs.exe!Finsert_file_contents(int filename=0x31448eb4, int visit=0x1137e804, int beg=0x00000000, int end=0x000006b7, int replace=0x1137e804) Line 4518 + 0x3d C
temacs.exe!Ffuncall(int nargs=0x00000002, int * args=0x0082f5bc) Line 2742 + 0x30 C
temacs.exe!Fbyte_code(int bytestr=0x3125d190, int vector=0x4125d25c, int maxdepth=0x00000007) Line 710 + 0x10 C
temacs.exe!funcall_lambda(int fun=0x4125d14c, int nargs=0x00000004, int * arg_vector=0x0082f83c) Line 2913 + 0x2b C
temacs.exe!Ffuncall(int nargs=0x00000005, int * args=0x0082f838) Line 2772 + 0x14 C
temacs.exe!call4(int fn=0x113f547c, int arg1=0x31448f44, int arg2=0x31448fc4, int arg3=0x1137e804, int arg4=0x1137e804) Line 2585 + 0xb C
temacs.exe!Fload(int file=0x31448fc4, int noerror=0x1137e804, int nomessage=0x1137e804, int nosuffix=0x1137e804, int must_suffix=0x1137e804) Line 866 + 0x7f C
temacs.exe!Feval(int form=0x5144453c) Line 2093 + 0x31 C
temacs.exe!readevalloop(int readcharfun=0x113a1f7c, _iobuf * stream=0x0122c240, int sourcename=0x313c3374, int (void)* evalfun=0x0114ee90, int printflag=0x00000000, int unibyte=0x1137e804, int readfun=0x1137e804) Line 1376 + 0x9 C
temacs.exe!Fload(int file=0x313c3374, int noerror=0x1137e804, int nomessage=0x1137e804, int nosuffix=0x1137e804, int must_suffix=0x1137e804) Line 914 + 0x29 C
temacs.exe!Feval(int form=0x513c39d4) Line 2093 + 0x31 C
temacs.exe!top_level_2() Line 1301 + 0xb C
temacs.exe!internal_condition_case(int (void)* bfun=0x01017530, int handlers=0x1139ba44, int (void)* hfun=0x01017160) Line 1333 + 0x5 C
temacs.exe!top_level_1() Line 1309 + 0x16 C
temacs.exe!internal_catch(int tag=0x1139b004, int (void)* func=0x01017550, int arg=0x1137e804) Line 1094 + 0x9 C
temacs.exe!command_loop() Line 1270 + 0x18 C
temacs.exe!recursive_edit_1() Line 987 + 0x5 C
temacs.exe!Frecursive_edit() Line 1044 C
temacs.exe!main() Line 1668 C
temacs.exe!mainCRTStartup() Line 259 + 0x12 C
temacs.exe!_start() Line 131 C
kernel32.dll!77e814c7()
Locals at the point of the error:
c2 0xcccccccc int
c1 0x0000003b int
+ coding 0x0081f1e4 {type=coding_type_iso2022 eol_type=0x00000001 common_flags=0x00000007 ...} coding_system *
+ source 0x0158da80 ";;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
;; Copyright (C) 1996, 2001 Free Software Foundation, Inc.
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Indian, Devanagari
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 0" unsigned char *
+ destination 0x0158d2b0 "" unsigned char *
src_bytes 0x000006b7 int
dst_bytes 0x00000000 int
charset1 0xffffffff int
charset 0x00000000 int
+ src 0x0158da81 ";; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
;; Copyright (C) 1996, 2001 Free Software Foundation, Inc.
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Indian, Devanagari
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 02" unsigned char *
translation_table 0x41398000 int
c 0xcccccccc int
charset0 0x00000000 int
+ src_end 0x0158e137 "" unsigned char *
+ dst_end 0x0158d2b0 "" unsigned char *
+ dst 0x0158d2b0 "" unsigned char *
+ src_base 0x0158da80 ";;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
;; Copyright (C) 1996, 2001 Free Software Foundation, Inc.
;; Maintainer: KAWABATA, Taichi <kawabata@m17n.org>
;; Keywords: multilingual, Indian, Devanagari
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs; see the file COPYING. If not, write to the
;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
;; Boston, MA 0" unsigned char *
safe_chars 0x1137e834 int
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] coding.c/decode_coding_iso2022
2003-08-14 17:31 [BUG] coding.c/decode_coding_iso2022 David Abrahams
@ 2003-08-14 17:38 ` David Abrahams
2003-08-15 0:42 ` Kenichi Handa
1 sibling, 0 replies; 5+ messages in thread
From: David Abrahams @ 2003-08-14 17:38 UTC (permalink / raw)
David Abrahams <dave@boost-consulting.com> writes:
> Tired of the numerous crashes I've been getting under NT, I
> recompiled emacs with all the runtime checks enabled. I think I'll
> be posting lots of reports.
>
> The title function uses variable c2 uninitialized during this phase
> of the make process:
The same applies for c2 in decode_coding_sjis_big5.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] coding.c/decode_coding_iso2022
2003-08-14 17:31 [BUG] coding.c/decode_coding_iso2022 David Abrahams
2003-08-14 17:38 ` David Abrahams
@ 2003-08-15 0:42 ` Kenichi Handa
2003-08-15 2:41 ` David Abrahams
1 sibling, 1 reply; 5+ messages in thread
From: Kenichi Handa @ 2003-08-15 0:42 UTC (permalink / raw)
Cc: emacs-devel
In article <usmo4rvqo.fsf@boost-consulting.com>, David Abrahams <dave@boost-consulting.com> writes:
> Tired of the numerous crashes I've been getting under NT, I
> recompiled emacs with all the runtime checks enabled. I think I'll
> be posting lots of reports.
> The title function uses variable c2 uninitialized during this phase
> of the make process:
> Loading language/devanagari (source)...
> The stack trace is:
> ntdll.dll!77f75a58()
> temacs.exe!failwithmessage(void * retaddr=0x011b5c7f, int crttype=0x00000001, int errnum=0x00000003, const char * msg=0x0111431e) + 0x106 C++
> temacs.exe!_RTC_UninitUse(const char * varname=0x01114900) + 0x9c C++
>> temacs.exe!decode_coding_iso2022() Line 2169 + 0x33c C
It seems that the relevant line is this:
c = DECODE_ISO_CHARACTER (charset, c1, c2);
But, ...
[...]
> Locals at the point of the error:
> c2 0xcccccccc int
> c1 0x0000003b int
> + coding 0x0081f1e4 {type=coding_type_iso2022 eol_type=0x00000001 common_flags=0x00000007 ...} coding_system *
> + source 0x0158da80 ";;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
[...]
> + destination 0x0158d2b0 "" unsigned char *
> src_bytes 0x000006b7 int
> dst_bytes 0x00000000 int
> charset1 0xffffffff int
> charset 0x00000000 int
> + src 0x0158da81 ";; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
[...]
> translation_table 0x41398000 int
> c 0xcccccccc int
> charset0 0x00000000 int
> + src_end 0x0158e137 "" unsigned char *
> + dst_end 0x0158d2b0 "" unsigned char *
> + dst 0x0158d2b0 "" unsigned char *
> + src_base 0x0158da80 ";;; devanagari.el --- Support for Devanagari -*- coding: iso-2022-7bit; no-byte-compile: t -*-
[...]
> safe_chars 0x1137e834 int
As the value of charset is 0, c2 is never referred in the
macro DECODE_ISO_CHARACTER except for as the last argument
to the function translate_char. And in that function also,
as charset is zero, c2 is never referred.
So, I think this is not the reason of the crash of your emacs.
---
Ken'ichi HANDA
handa@m17n.org
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] coding.c/decode_coding_iso2022
2003-08-15 0:42 ` Kenichi Handa
@ 2003-08-15 2:41 ` David Abrahams
2003-08-15 2:45 ` Kenichi Handa
0 siblings, 1 reply; 5+ messages in thread
From: David Abrahams @ 2003-08-15 2:41 UTC (permalink / raw)
Cc: emacs-devel
Kenichi Handa <handa@m17n.org> writes:
> As the value of charset is 0, c2 is never referred in the
> macro DECODE_ISO_CHARACTER except for as the last argument
> to the function translate_char. And in that function also,
> as charset is zero, c2 is never referred.
>
> So, I think this is not the reason of the crash of your emacs.
Oh, I'm sure that's true. The use of the value of an uninitialized
variable, however, is very likely to be a bug someone should address,
which is why I posted it.
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [BUG] coding.c/decode_coding_iso2022
2003-08-15 2:41 ` David Abrahams
@ 2003-08-15 2:45 ` Kenichi Handa
0 siblings, 0 replies; 5+ messages in thread
From: Kenichi Handa @ 2003-08-15 2:45 UTC (permalink / raw)
Cc: emacs-devel
In article <uvfszmylb.fsf@boost-consulting.com>, David Abrahams <dave@boost-consulting.com> writes:
> Kenichi Handa <handa@m17n.org> writes:
>> As the value of charset is 0, c2 is never referred in the
>> macro DECODE_ISO_CHARACTER except for as the last argument
>> to the function translate_char. And in that function also,
>> as charset is zero, c2 is never referred.
>>
>> So, I think this is not the reason of the crash of your emacs.
> Oh, I'm sure that's true. The use of the value of an uninitialized
> variable, however, is very likely to be a bug someone should address,
> which is why I posted it.
I see. You are right. I'll install a fix soon.
---
Ken'ichi HANDA
handa@m17n.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2003-08-15 2:45 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-08-14 17:31 [BUG] coding.c/decode_coding_iso2022 David Abrahams
2003-08-14 17:38 ` David Abrahams
2003-08-15 0:42 ` Kenichi Handa
2003-08-15 2:41 ` David Abrahams
2003-08-15 2:45 ` Kenichi Handa
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).