SEGV by test/ruby/test_io_m17n.rb

test_io_m17n.rb e$B$Ge(B SEGV e$B$9$k$h$&$K$J$C$?$h$&$G$9!#e(B

% ./ruby test/runner.rb test/ruby/test_io_m17n.rb
Loaded suite test_io_m17n.rb
Started
/tmp/a/ruby/test/ruby/test_io_m17n.rb:231: [BUG] Segmentation fault
ruby 1.9.0 (2008-01-21 revision 0) [i686-linux]

– control frame ----------
c:0031 p:---- s:0104 b:0104 l:000103 d:000103 CFUNC :encode
c:0030 p:---- s:0102 b:0102 l:000101 d:000101 CFUNC :getc
c:0029 p:0020 s:0099 b:0097 l:000067 d:000096 BLOCK
/tmp/a/ruby/test/ruby/test_io_m17n.rb:231
c:0028 p:---- s:0097 b:0097 l:000096 d:000096 FINISH :initialize
c:0027 p:---- s:0095 b:0095 l:000094 d:000094 CFUNC :open
c:0026 p:0037 s:0090 b:0090 l:000067 d:000089 BLOCK
/tmp/a/ruby/test/ruby/test_io_m17n.rb:230
c:0025 p:0006 s:0088 b:0088 l:000070 d:000087 BLOCK
/tmp/a/ruby/test/ruby/test_io_m17n.rb:16
c:0024 p:---- s:0089 b:0089 l:000088 d:000088 FINISH :call
c:0023 p:---- s:0087 b:0087 l:000086 d:000086 CFUNC :chdir
c:0022 p:0016 s:0083 b:0083 l:000070 d:000082 BLOCK
/tmp/a/ruby/test/ruby/test_io_m17n.rb:15
c:0021 p:0270 s:0081 b:0081 l:000080 d:000080 METHOD
/tmp/a/lib/ruby/1.9.0/tmpdir.rb:122
c:0020 p:0013 s:0071 b:0071 l:000070 d:000070 METHOD
/tmp/a/ruby/test/ruby/test_io_m17n.rb:14
c:0019 p:0007 s:0068 b:0068 l:000067 d:000067 METHOD
/tmp/a/ruby/test/ruby/test_io_m17n.rb:227
c:0018 p:0039 s:0065 b:0065 l:000064 d:000064 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/testcase.rb:76
c:0017 p:0015 s:0060 b:0060 l:000054 d:000059 BLOCK
/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:34
c:0016 p:---- s:0060 b:0060 l:000059 d:000059 FINISH :inherited
c:0015 p:---- s:0058 b:0058 l:000057 d:000057 CFUNC :each
c:0014 p:0026 s:0055 b:0055 l:000054 d:000054 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33
c:0013 p:0015 s:0050 b:0050 l:000044 d:000049 BLOCK
/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:34
c:0012 p:---- s:0050 b:0050 l:000049 d:000049 FINISH :%
c:0011 p:---- s:0048 b:0048 l:000047 d:000047 CFUNC :each
c:0010 p:0026 s:0045 b:0045 l:000044 d:000044 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33
c:0009 p:0128 s:0040 b:0040 l:001b04 d:001b04 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/ui/testrunnermediator.rb:46
c:0008 p:0008 s:0031 b:0031 l:000030 d:000030 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:67
c:0007 p:0023 s:0028 b:0028 l:000027 d:000027 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:41
c:0006 p:0026 s:0025 b:0025 l:000024 d:000024 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/ui/testrunnerutilities.rb:29
c:0005 p:0051 s:0020 b:0020 l:000019 d:000019 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/autorunner.rb:216
c:0004 p:0070 s:0016 b:0016 l:000015 d:000015 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/autorunner.rb:12
c:0003 p:0139 s:0008 b:0007 l:000006 d:000006 TOP test/runner.rb:9
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH :inherited
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17

DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:231:in getc'" DBG> : "/tmp/a/ruby/test/ruby/test_io_m17n.rb:231:inblock (2 levels)
in test_getc_stateful_conversion’”
DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:230:in open'" DBG> : "/tmp/a/ruby/test/ruby/test_io_m17n.rb:230:inblock in
test_getc_stateful_conversion’”
DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:16:in block (2 levels) in with_tmpdir'" DBG> : "/tmp/a/ruby/test/ruby/test_io_m17n.rb:15:inchdir’”
DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:15:in block in with_tmpdir'" DBG> : "/tmp/a/lib/ruby/1.9.0/tmpdir.rb:122:inmktmpdir’”
DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:14:in with_tmpdir'" DBG> : "/tmp/a/ruby/test/ruby/test_io_m17n.rb:227:intest_getc_stateful_conversion’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/testcase.rb:76:in run'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:34:inblock in
run’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in each'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33:inrun’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:34:in block in run'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33:ineach’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in run'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/ui/testrunnermediator.rb:46:inrun_suite’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:67:in
start_mediator'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:41:instart’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/ui/testrunnerutilities.rb:29:in
run'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/autorunner.rb:216:inrun’”
DBG> : “/tmp/a/lib/ruby/1.9.0/test/unit/autorunner.rb:12:in run'" DBG> : "test/runner.rb:9:in'”
– backtrace of native function call (Use addr2line) –
0x80f07c5
0x810f6de
0x810f73b
0x80bfa20
0xb7f89440
0x80d96e3
0x80d9cc3
0x80e6c9e
0x80ef6e5
0x805b3b8
0x805b6a0
0x805ba06
0x806ad2e
0x80eefe3
0x80ea90e
0x80ee1d4
0x80ee907
0x805ae4e
0x8059911
0x806af38
0x807217d
0x80e6c9e
0x80eefe3
0x80ea90e
0x80ee1d4
0x80ee907
0x805ae4e
0x8059911
0x8109b97
0x80e6c9e
0x80eefe3
0x80ea90e
0x80ee1d4
0x80ee907
0x805ae4e
0x80fa00f
0x8059911
0x80fb145
0x80eefe3
0x80ea90e
0x80ee1d4
0x80ee907
0x805ae4e
0x80fa00f
0x8059911
0x80fb145
0x80eefe3
0x80ea90e
0x80ee1d4
0x80ee50d
0x805a759
0x805e850
0x8058185
0xb7deaea8
0x8058081

e$BEDCf$5$s!"$3$s$K$A$O!#e(B

e$B$3$l$Oe(B encode e$B$G$3$1$^$7$?$_$?$$$N$G!"@UG$$r46$8$F$$$^$9$,!“e(B
e$B$3$l$+$i2?$r$9$l$P$”$^$j$h$/J,$+$j$^$;$s$N$G65$($F$/$@$5$$!#e(B
e$B$b$C$HC;$$e(B Ruby
e$B$N%W%m%0%i%`$G%(%i!<$,$G$l$P@'HsAw$C$F$/$@$5$$!#e(B

At 12:36 08/01/21, Tanaka A. wrote:

test_io_m17n.rb e$B$Ge(B SEGV e$B$9$k$h$&$K$J$C$?$h$&$G$9!#e(B

% ./ruby test/runner.rb test/ruby/test_io_m17n.rb

e$B$3$A$i$G$3$l$r$d$m$&$H$7$?$i!"e(B
test/runner.rb:3:in `require’: no such file to load – test/unit
(LoadError)
e$B$K$J$j$^$7$?!#e(B
./ruby e$B$re(B (install e$B:Q$_e(B) e$B$Ne(B ruby
e$B$KJQ99$7$?$i!“e(BError e$B0l$D$He(B
Failure e$B0l$D$,$G$F$-$^$7$?!#$3$l$O$=$A$i$Ne(B Segmentation fault
e$B$H4X78$”$k$N$G$7$g$&$+!#e(B

e$B59$7$/$*4j$$$7$^$9!#e(B Martin.

duerst@Tanzawa /cygdrive/d/ruby
$ ruby test/runner.rb test/ruby/test_io_m17n.rb
Loaded suite test_io_m17n.rb
Started
E…F…
Finished in 1.125 seconds.

  1. Error:
    test_getc_stateful_conversion(TestIO_M17N):
    RuntimeError: this mode is not supported (ESC
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:231:in encode' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:231:in getc’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:231:in block (2 levels) in test_getc_stateful_conversion' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:230:in open’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:230:in block in test_getc_stateful_conversion' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:16:in block (2 levels)
    in with_tmpdir’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:15:in chdir' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:15:in block in
    with_tmpdir’
    /usr/local/lib/ruby/1.9.0/tmpdir.rb:122:in mktmpdir' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:14:in with_tmpdir’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:227:in
    `test_getc_stateful_conversion’

  2. Failure:
    test_terminator_stateful_conversion(TestIO_M17N)
    [/cygdrive/d/ruby/test/ruby/test_io_m17n.rb:44:in assert_str_equal' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:177:in block in
    test_terminator_stateful_conversion’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:16:in block (2 levels) in with_tmpdir' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:15:in chdir’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:15:in block in with_tmpdir' /usr/local/lib/ruby/1.9.0/tmpdir.rb:122:in mktmpdir’
    /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:14:in with_tmpdir' /cygdrive/d/ruby/test/ruby/test_io_m17n.rb:170:in test_terminator_stateful_conversion’]:
    “before \xA3\xB0\xA3\xB1 after”.force_encoding(“EUC-JP”) expected but
    not equal to
    “before \xA3\xB0”.force_encoding(“EUC-JP”).

25 tests, 157 assertions, 1 failures, 1 errors

duerst@Tanzawa /cygdrive/d/ruby
$

c:0028 p:---- s:0097 b:0097 l:000096 d:000096 FINISH :initialize
/tmp/a/lib/ruby/1.9.0/tmpdir.rb:122
c:0014 p:0026 s:0055 b:0055 l:000054 d:000054 METHOD
/tmp/a/lib/ruby/1.9.0/test/unit/ui/console/testrunner.rb:67
c:0001 p:0000 s:0002 b:0002 l:000001 d:000001 TOP :17
DBG> : “/tmp/a/ruby/test/ruby/test_io_m17n.rb:15:in block in with_tmpdir'" DBG> : "/tmp/a/lib/ruby/1.9.0/test/unit/testsuite.rb:33:in run’”
0x80f07c5
0x805ba06
0x80eefe3
0x80ee907
0x8059911

zsh: abort (core dumped) ./ruby test/runner.rb test/ruby/test_io_m17n.rb

[e$BEDCfe(B e$BE/e(B][e$B$?$J$+e(B e$B$"$-$ie(B][Tanaka A.]

#-#-# Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University
#-#-# http://www.sw.it.aoyama.ac.jp mailto:[email protected]