ruby-changes:68708
From: Maxime <ko1@a...>
Date: Thu, 21 Oct 2021 08:12:31 +0900 (JST)
Subject: [ruby-changes:68708] dde69ab5c6 (master): Fix ujit block hash table bug
https://git.ruby-lang.org/ruby.git/commit/?id=dde69ab5c6 From dde69ab5c63a01c20c9bc19b7a11d9c64f6dab2a Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert <maxime.chevalierboisvert@s...> Date: Tue, 19 Jan 2021 14:17:51 -0500 Subject: Fix ujit block hash table bug --- ujit_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ujit_core.c b/ujit_core.c index 3211643f80..6f51440b86 100644 --- a/ujit_core.c +++ b/ujit_core.c @@ -115,6 +115,7 @@ block_t* gen_block_version(blockid_t blockid, const ctx_t* start_ctx) https://github.com/ruby/ruby/blob/trunk/ujit_core.c#L115 // Keep track of the new block version st_insert(version_tbl, (st_data_t)&block->blockid, (st_data_t)block); + RUBY_ASSERT(find_block_version(blockid, start_ctx) != NULL); // For each successor block to compile for (;;) { @@ -482,7 +483,7 @@ int blockid_cmp(st_data_t arg0, st_data_t arg1) https://github.com/ruby/ruby/blob/trunk/ujit_core.c#L483 { const blockid_t *block0 = (const blockid_t*)arg0; const blockid_t *block1 = (const blockid_t*)arg1; - return (block0->iseq == block1->iseq) && (block0->idx == block1->idx); + return (block0->iseq != block1->iseq) || (block0->idx != block1->idx); } st_index_t blockid_hash(st_data_t arg) -- cgit v1.2.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/