[前][次][番号順一覧][スレッド一覧]

ruby-changes:68840

From: Alan <ko1@a...>
Date: Thu, 21 Oct 2021 08:14:12 +0900 (JST)
Subject: [ruby-changes:68840] cf011b6676 (master): Check for null

https://git.ruby-lang.org/ruby.git/commit/?id=cf011b6676

From cf011b66761cb942899110117f56001e849733da Mon Sep 17 00:00:00 2001
From: Alan Wu <XrXr@u...>
Date: Thu, 11 Mar 2021 11:19:02 -0500
Subject: Check for null

Sometimes you bop before you init, you know?
---
 yjit_iface.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/yjit_iface.c b/yjit_iface.c
index 6424d34938..c29b4d8e81 100644
--- a/yjit_iface.c
+++ b/yjit_iface.c
@@ -472,7 +472,9 @@ block_invalidation_iterator(st_data_t key, st_data_t value, st_data_t data) { https://github.com/ruby/ruby/blob/trunk/yjit_iface.c#L472
 void
 rb_yjit_bop_redefined(VALUE klass, const rb_method_entry_t *me, enum ruby_basic_operators bop)
 {
-    st_foreach(blocks_assuming_bops, block_invalidation_iterator, 0);
+    if (blocks_assuming_bops) {
+        st_foreach(blocks_assuming_bops, block_invalidation_iterator, 0);
+    }
 }
 
 /* Called when the constant state changes */
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]