From 6e5e5df1bfd971687cb370c4f42226a5fc255dfc Mon Sep 17 00:00:00 2001 From: usa Date: Mon, 26 Aug 2019 15:10:32 +0000 Subject: merge revision(s) ea42423908ed055f9039b1dce6e9a232a3b2dd90: [Backport #15887] Keep vm->orig_progname alive `vm->orig_progname` can be different from `vm->progname` when user code assigns to `$0`. While `vm->progname` is kept alive by the global table, nothing marked `vm->orig_progname`. [Bug #15887] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_5@67761 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 1 + 1 file changed, 1 insertion(+) (limited to 'vm.c') diff --git a/vm.c b/vm.c index 5d15734055..bf7bbbf43c 100644 --- a/vm.c +++ b/vm.c @@ -2100,6 +2100,7 @@ rb_vm_mark(void *ptr) rb_gc_mark(vm->loaded_features); rb_gc_mark(vm->loaded_features_snapshot); rb_gc_mark(vm->top_self); + rb_gc_mark(vm->orig_progname); RUBY_MARK_UNLESS_NULL(vm->coverages); rb_gc_mark(vm->defined_module_hash); -- cgit v1.2.3