[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

nvi-m17n dumps core



こんにちは、すながわです。

毎日nvi-m17nを便利に使っていますが、日本語の文章を書いている
とたまに落ちてしまいます。環境は以下のとおりです。

・OSのバージョン
NetBSD vivid 1.4.1 NetBSD 1.4.1 (GENERIC) #1: Tue Aug 10 00:03:09 MEST 1999     fvdl@struis:/usr/src/sys/arch/i386/compile/GENERIC i386

・設定ファイル~/.nexrc
set autoindent
set displayencoding=iso-2022-jp
set fileencoding=iso-2022-jp
set inputencoding=euc-jp

・日本語入力
pkgsrcから入れたkinput2とFreeWnn-1.10

gdbで覗くとこのようになりました。もうちょっと追いかけてみる
つもりですが、とりあえず報告です。

$ gdb nvi
GNU gdb 4.17
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386--netbsd"...
(gdb) target core nvi.core
warning: exec file is newer than core file.
Core was generated by `nvi'.
Program terminated with signal 6, Abort trap.
Reading symbols from /usr/libexec/ld.so...done.
Reading symbols from /usr/lib/libtermlib.so.0.0...done.
Reading symbols from /usr/lib/libc.so.12.40...done.
#0  0x400d1adb in kill ()
(gdb) where
#0  0x400d1adb in kill ()
#1  0x400d1859 in abort ()
#2  0x341f8 in v_txt (sp=0x66800, vp=0xefbfd4e0, tm=0x0, lp=0x891c9 "", len=0, 
    prompt=0, ai_line=32, rcount=1, flags=75793433) at ./../vi/v_txt.c:1401
#3  0x2e37e in io (sp=0x66800, vp=0xefbfd4e0, cmd=O_cmd)
    at ./../vi/v_itxt.c:270
#4  0x2e220 in v_iO (sp=0x66800, vp=0xefbfd4e0) at ./../vi/v_itxt.c:212
#5  0x390a8 in vi (spp=0xefbfd578) at ./../vi/vi.c:249
#6  0x21b18 in editor (gp=0x66000, argc=2, argv=0xefbfd738)
    at ./../common/main.c:419
#7  0x283c in main (argc=2, argv=0xefbfd734) at ./../cl/cl_main.c:148
(gdb) quit

以下のtestにかかっているようです。

vi/v_txt.c:

  1396			} else {
  1397				/*
  1398				 * multibyte chars must go through.
  1399				 */
  1400				if (mbbufmax < mbbuflen)
  1401					abort();
  1402				mbbuf[mbbuflen++] = evp->e_c;
  1403				mbbuf[mbbuflen] = '\0';
  1404				if (mbbuflen == mbbufmax) {
  1405					mbbufmax = mbbuflen = 0;
  1406					goto ins_mbch;
  1407				}
  1408			}

--
SUNAGAWA Keiki <Keiki_SUNAGAWA@yokogawa.co.jp>