Issue #7095 has been updated by naruse (Yui NARUSE).

Status changed from Closed to Assigned

authorNari (Narihiro Nakamura) wrote:
> This issue was solved with changeset r37075.
> Narihiro, thank you for reporting this issue.
> Your contribution to Ruby is greatly appreciated.
> May Ruby be with you.
> ----------
> * gc.c: Use the non-recursive marking instead of recursion. The
>   recursion marking of CRuby needs checking stack overflow and the
>   fail-safe system, but these systems not good at partial points,
>   for example, marking deep tree structures. [ruby-dev:46184]
>   [Feature #7095]
> 
> * configure.in (GC_MARK_STACKFRAME_WORD): removed. It's used by
>   checking stack overflow of marking.
> 
> * win32/Makefile.sub (GC_MARK_STACKFRAME_WORD): ditto.

?????????以??????Linux 32bit ??????? SEGV ?????? backtrace ???????????????????確??????????????????

% ./ruby -e'Process.kill :SEGV, $$'
-e:1: [BUG] Segmentation fault
ruby 2.0.0dev (2012-10-03 trunk 37076) [i686-linux]

zsh: segmentation fault  ./ruby -e'Process.kill :SEGV, $$'

http://u32.rubyci.org/~chkbuild/ruby-trunk/log/20121003T130302Z.diff.html.gz
----------------------------------------
Feature #7095: Non-recursive marking
https://bugs.ruby-lang.org/issues/7095#change-30015

Author: authorNari (Narihiro Nakamura)
Status: Assigned
Priority: Normal
Assignee: authorNari (Narihiro Nakamura)
Category: core
Target version: 2.0.0


nari???????

GC???????????????帰????????使???????????????????????????????

差??: https://github.com/authorNari/ruby/compare/non_recursion_marking
?????????: https://github.com/authorNari/ruby/compare/non_recursion_marking.patch

= ????????
?????????????????????????????????????????????孫?????????
????gc_mark()??????帰????????????????????????????????
??????????????????????????????????????????????????????????????????????
???溢???????????????GC?????????????????????溢???????????????????????????以??
???????????????使????????????????????????????????????

??????????次???2????????????????????????????????

1. ??????深?????????????????????????????????????????????
2. ????????????????????????????????精度??????

1.????????????????????????????????????????????????使?????????????
???????????????????????????????走?????????????????????????????????????
??????????????????深?????????群??????????????????????????GC???????????????????????
????????????????????????????

2.????????????????以??????????????????????????
https://bugs.ruby-lang.org/issues/3781
????????????????????????????????????????????精度?????????????
???????????????????????????????????????常???????????????????????
FIBER_USE_NATIVE ??????????????????????????????????????????????
?????????????????????SEGV?????????????????????
# ??????????????????張????????????????????????????????SEGV????????
# ??????????????????????????????????

= ?????
????????????????????????????????????使???????帰??????????????????????????
???????????????????????????????帰????????使????????????????????
???????????

= ???度???
mark benchmark OPTS="-r 5" ???走????????????????????????????????????????
????????????????

https://gist.github.com/3806667
(target 0???修正???, target 1?????????帰????????????
"average total difference is -7.793935319666676"

?????????????????深????????????????????????????????????????????????????
??????????????????????????????????帰??????????????????????????????????
https://gist.github.com/3812118

depth???240?????
origin ?GC??????(sec): 1.96
non-recursive ?GC??????(sec): 1.87

depth???500?????
origin ?GC??????(sec): 14.73
non-recursive ?GC??????(sec): 5.49



-- 
http://bugs.ruby-lang.org/