Project

General

Profile

Actions

Bug #3782

closed

NendoのテストスイートでSEGVが発生する

Added by kiyoka (Kiyoka Nishiyama) about 14 years ago. Updated over 13 years ago.

Status:
Rejected
Target version:
-
ruby -v:
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]
Backport:
[:]

Description

=begin
私の個人的なプロジェクト(Nendo)のテストスイートを実行するとSegmentation FaultでRubyが落ちます。
RSpecで定義したテストスイートをなるべく短かくする努力はしてみたのですが、これが限界のようですので、あきらめて私の作ったミニマムのものを残した上で現象の報告をします。

※ テストスイートが短かくなったとはいえ、NendoはLisp処理系でありRubyのevalを多様していますのでバグの解析の難易度は高そうです。

今後、いつでも現象を再現させられるように、github上のNendoリポジトリにブランチ(ruby192_segv_environment) を作成しておきました。
以下、再現手順です。

/tmp $ uname -a
Darwin nishiyama-kiyoka-no-MacBook-Pro.local 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386
/tmp $ gcc --version
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5664)
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
/tmp $ ruby --version
ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]

/tmp $ pwd
/tmp
/tmp $ git clone http://github.com/kiyoka/nendo.git
Cloning into nendo...
remote: Counting objects: 2379, done.
remote: Compressing objects: 100% (1119/1119), done.
remote: Total 2379 (delta 1547), reused 1865 (delta 1207)
Receiving objects: 100% (2379/2379), 1.51 MiB | 317 KiB/s, done.
Resolving deltas: 100% (1547/1547), done.
/tmp $ cd nendo
/tmp/nendo $ git branch

  • master
    /tmp/nendo $ git branch -r
    origin/HEAD -> origin/master
    origin/export_nendo_function
    origin/gh-pages
    origin/master
    origin/porting_gauche.test
    origin/porting_srfi1
    origin/porting_util.list
    origin/refactor_macroexpand
    origin/regexp_literal
    origin/ruby192_segv_environment
    origin/ruby_block_argument_challenge
    origin/tco_challenge
    origin/tco_challenge2
    origin/toplevel_func_as_method
    /tmp/nendo $ git pull origin ruby192_segv_environment
    From http://github.com/kiyoka/nendo
  • branch ruby192_segv_environment -> FETCH_HEAD
    Updating 05a035b..e8f6ae9
    Fast-forward
    test/nendo_spec.rb | 1714 ----------------------------------------------------
    1 files changed, 0 insertions(+), 1714 deletions(-)
    /tmp/nendo $ git branch
  • master
    /tmp/nendo $ git checkout ruby192_segv_environment
    Branch ruby192_segv_environment set up to track remote branch ruby192_segv_environment from origin.
    Switched to a new branch 'ruby192_segv_environment'
    /tmp/nendo $ git branch
    master
  • ruby192_segv_environment
    /tmp/nendo $ rake check
    (in /private/tmp/nendo)
    ruby -I ./lib /usr/local/bin/spec -b ./test/nendo_spec.rb
    ../private/tmp/nendo/lib/nendo.rb:1426: [BUG] Segmentation fault
    ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10.4.0]

-- control frame ----------
c:0029 p:0006 s:0132 b:0132 l:000131 d:000131 METHOD /private/tmp/nendo/lib/nendo.rb:1426
c:0028 p:0011 s:0127 b:0127 l:000640 d:000126 EVAL (string):3
c:0027 p:---- s:0125 b:0125 l:000124 d:000124 FINISH
c:0026 p:---- s:0123 b:0123 l:000122 d:000122 CFUNC :eval
c:0025 p:0471 s:0116 b:0116 l:000115 d:000115 METHOD /private/tmp/nendo/lib/nendo.rb:1982
c:0024 p:0201 s:0106 b:0105 l:000104 d:000104 METHOD /private/tmp/nendo/lib/nendo.rb:2256
c:0023 p:0307 s:0095 b:0095 l:0017f8 d:000b88 BLOCK /private/tmp/nendo/test/nendo_spec.rb:114
c:0022 p:---- s:0093 b:0093 l:000092 d:000092 FINISH
c:0021 p:---- s:0091 b:0091 l:000090 d:000090 CFUNC :instance_eval
c:0020 p:0024 s:0088 b:0088 l:000072 d:000087 BLOCK /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:40
c:0019 p:0031 s:0085 b:0085 l:000084 d:000084 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:44
c:0018 p:0062 s:0073 b:0073 l:000072 d:000072 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:37
c:0017 p:0047 s:0066 b:0065 l:000055 d:000064 BLOCK /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:214
c:0016 p:---- s:0061 b:0061 l:000060 d:000060 FINISH
c:0015 p:---- s:0059 b:0059 l:000058 d:000058 CFUNC :each
c:0014 p:0035 s:0056 b:0056 l:000055 d:000055 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212
c:0013 p:0135 s:0048 b:0048 l:000047 d:000047 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:103
c:0012 p:0017 s:0040 b:0039 l:000030 d:000038 BLOCK /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:23
c:0011 p:---- s:0036 b:0036 l:000035 d:000035 FINISH
c:0010 p:---- s:0034 b:0034 l:000033 d:000033 CFUNC :each
c:0009 p:0033 s:0031 b:0031 l:000030 d:000030 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22
c:0008 p:0225 s:0027 b:0027 l:000026 d:000026 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/options.rb:152
c:0007 p:0068 s:0022 b:0022 l:000021 d:000021 METHOD /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9
c:0006 p:0109 s:0017 b:0016 l:000015 d:000015 TOP /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/bin/spec:5
c:0005 p:---- s:0013 b:0013 l:000012 d:000012 FINISH
c:0004 p:---- s:0011 b:0011 l:000010 d:000010 CFUNC :load
c:0003 p:0127 s:0007 b:0007 l:001598 d:0014d0 EVAL /usr/local/bin/spec:19
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:001598 d:001598 TOP

-- Ruby level backtrace information ----------------------------------------
/usr/local/bin/spec:19:in <main>' /usr/local/bin/spec:19:in load'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/bin/spec:5:in <top (required)>' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/command_line.rb:9:in run'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/options.rb:152:in run_examples' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in run'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:22:in each' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/runner/example_group_runner.rb:23:in block in run'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:103:in run' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in run_examples'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:212:in each' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_group_methods.rb:214:in block in run_examples'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:37:in execute' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/timeout.rb:44:in timeout'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:40:in block in execute' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/gems/1.9.1/gems/rspec-1.3.0/lib/spec/example/example_methods.rb:40:in instance_eval'
/private/tmp/nendo/test/nendo_spec.rb:114:in block (2 levels) in <top (required)>' /private/tmp/nendo/lib/nendo.rb:2256:in evalStr'
/private/tmp/nendo/lib/nendo.rb:1982:in lispEval' /private/tmp/nendo/lib/nendo.rb:1982:in eval'
(string):3:in initialize' /private/tmp/nendo/lib/nendo.rb:1426:in trampCall'

-- C level backtrace information -------------------------------------------

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

rake aborted!
Command failed with status (): [ruby -I ./lib /usr/local/bin/spec -b ./tes...]
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:993:in block in sh' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:1008:in call'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:1008:in sh' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:1092:in sh'
/private/tmp/nendo/Rakefile:41:in block (2 levels) in <top (required)>' /private/tmp/nendo/Rakefile:40:in each'
/private/tmp/nendo/Rakefile:40:in block in <top (required)>' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:634:in call'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:634:in block in execute' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:629:in each'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:629:in execute' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:595:in block in invoke_with_call_chain'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/monitor.rb:201:in mon_synchronize' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:588:in invoke_with_call_chain'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:581:in invoke' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2041:in invoke_task'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2019:in block (2 levels) in top_level' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2019:in each'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2019:in block in top_level' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2058:in standard_exception_handling'
/usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:2013:in top_level' /usr/local/stow/ruby-1.9.2-p0/lib/ruby/1.9.1/rake.rb:1992:in run'
/usr/local/bin/rake:31:in `'
/tmp/nendo $
=end

Actions

Also available in: Atom PDF

Like0
Like0Like0Like0Like0