summaryrefslogtreecommitdiff
path: root/tool/ruby_vm/views/_mjit_compile_send.erb
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-03-12 22:51:33 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2020-03-12 22:51:34 -0700
commit0cd7be99e9a15f649970559e43e3edb704568670 (patch)
tree848fb360585d0f78ad6f26fdb89a4b61b920beb0 /tool/ruby_vm/views/_mjit_compile_send.erb
parent43e18c68f4d53767db7aae232ca46c2b400148cd (diff)
Avoid referring to an old value of realloc
OpenBSD RubyCI has failed with SEGV since 4bcd5981e80d3e1852c8723741a0069779464128. https://rubyci.org/logs/rubyci.s3.amazonaws.com/openbsd-current/ruby-master/log/20200312T223005Z.fail.html.gz This was because `status->cc_entries` could be stale after `realloc` call for inlined iseqs.
Diffstat (limited to 'tool/ruby_vm/views/_mjit_compile_send.erb')
-rw-r--r--tool/ruby_vm/views/_mjit_compile_send.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/tool/ruby_vm/views/_mjit_compile_send.erb b/tool/ruby_vm/views/_mjit_compile_send.erb
index 69352924bd..999e161d5d 100644
--- a/tool/ruby_vm/views/_mjit_compile_send.erb
+++ b/tool/ruby_vm/views/_mjit_compile_send.erb
@@ -14,7 +14,7 @@
MAYBE_UNUSED(<%= ope.fetch(:decl) %>) = (<%= ope.fetch(:type) %>)operands[<%= i %>];
% end
% # compiler: Use copied cc to avoid race condition
- const struct rb_callcache *captured_cc = status->cc_entries[call_data_index(cd, body)];
+ const struct rb_callcache *captured_cc = captured_cc_entries(status)[call_data_index(cd, body)];
%
if (!status->compile_info->disable_send_cache && has_valid_method_type(captured_cc)) {
const rb_iseq_t *iseq;