diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-01 08:25:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-11-01 08:25:34 +0000 |
commit | 21ea356a42724847f3066d68ad246639fb374927 (patch) | |
tree | e76d4df54133f693ca70769f0d0cb8696b098d14 | |
parent | d7b729dcd06fdaaacad6d2ca36811fcd73ad503e (diff) | |
download | ruby-21ea356a42724847f3066d68ad246639fb374927.tar.gz |
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
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | gc.c | 5 |
2 files changed, 9 insertions, 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 @@ -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; |