diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-04 06:51:31 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2017-09-04 06:51:31 +0900 |
| commit | 3acaa44a70a44a816076dee65310f0f2487aeebd (patch) | |
| tree | db7b29708bd51a1521d2695d0debdf562101d99a /src/gc.c | |
| parent | 8a5d783f2ee5ddccdb2b8de2edf5dc6b5ba1c3fc (diff) | |
| download | mruby-3acaa44a70a44a816076dee65310f0f2487aeebd.tar.gz mruby-3acaa44a70a44a816076dee65310f0f2487aeebd.zip | |
Restructure `irep->outer` chain; fix #3804
Instead of `irep -> proc` chain, we use `irep -> irep` chain to
avoid GC bugs like #3804. We added `target_class` reference to
`mrb_irep` struct. That means one more word consumption per `irep`.
Diffstat (limited to 'src/gc.c')
| -rw-r--r-- | src/gc.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -648,7 +648,7 @@ gc_mark_children(mrb_state *mrb, mrb_gc *gc, struct RBasic *obj) mrb_gc_mark(mrb, (struct RBasic*)p->env); mrb_gc_mark(mrb, (struct RBasic*)p->target_class); if (!MRB_PROC_CFUNC_P(p) && p->body.irep) { - mrb_gc_mark(mrb, (struct RBasic*)p->body.irep->outer); + mrb_gc_mark(mrb, (struct RBasic*)p->body.irep->target_class); } } break; |
