mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
gc.c: zombie is not alive
* gc.c (is_live_object): finalizer may not run because of lazy-sweep. [ruby-dev:47786] [Bug #9069] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d7b729dcd0
commit
21ea356a42
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Nov 1 17:25:30 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (is_live_object): finalizer may not run because of lazy-sweep.
|
||||
[ruby-dev:47786] [Bug #9069]
|
||||
|
||||
Fri Nov 1 16:55:52 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* string.c (rb_str_scrub): export with fixed length arguments, and
|
||||
|
|
5
gc.c
5
gc.c
|
@ -2050,7 +2050,10 @@ is_dead_object(rb_objspace_t *objspace, VALUE ptr)
|
|||
static inline int
|
||||
is_live_object(rb_objspace_t *objspace, VALUE ptr)
|
||||
{
|
||||
if (BUILTIN_TYPE(ptr) == 0) return FALSE;
|
||||
switch (BUILTIN_TYPE(ptr)) {
|
||||
case 0: case T_ZOMBIE:
|
||||
return FALSE;
|
||||
}
|
||||
if (RBASIC(ptr)->klass == 0) return FALSE;
|
||||
if (is_dead_object(objspace, ptr)) return FALSE;
|
||||
return TRUE;
|
||||
|
|
Loading…
Reference in a new issue