ruby-changes:60251
From: Koichi <ko1@a...>
Date: Mon, 2 Mar 2020 14:26:49 +0900 (JST)
Subject: [ruby-changes:60251] 4fd51f848a (master): vm_cc_fill() need to clear aux.
https://git.ruby-lang.org/ruby.git/commit/?id=4fd51f848a From 4fd51f848a59b999427d3b941d8777ec00f0431c Mon Sep 17 00:00:00 2001 From: Koichi Sasada <ko1@a...> Date: Mon, 2 Mar 2020 14:25:35 +0900 Subject: vm_cc_fill() need to clear aux. vm_cc_fill() fills CC information into stack allocated memory so it is not cleared. So we need to clear CC->aux. diff --git a/vm_callinfo.h b/vm_callinfo.h index 9b170bb..0f90d10 100644 --- a/vm_callinfo.h +++ b/vm_callinfo.h @@ -239,6 +239,7 @@ struct rb_callcache { https://github.com/ruby/ruby/blob/trunk/vm_callinfo.h#L239 union { const unsigned int attr_index; const enum method_missing_reason method_missing_reason; /* used by method_missing */ + VALUE v; } aux_; }; @@ -265,6 +266,7 @@ vm_cc_fill(struct rb_callcache *cc, https://github.com/ruby/ruby/blob/trunk/vm_callinfo.h#L266 .klass = klass, .cme_ = cme, .call_ = call, + .aux_.v = 0, }; MEMCPY(cc, &cc_body, struct rb_callcache, 1); return cc; -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/