Project

General

Profile

Bug #20477

Updated by ukolovda (Dmitry Ukolov) about 2 months ago

When I create Hash with 8 or more items, I got the error: items: 

 ```bash 
 ruby --rjit -e "a = 1; 1.upto(10) { b={a1: a&1, a2: a&1, a3: a&1, a4: a&1, a5: a&1,    a6: a&1, a7: a&1, a8: a&1} }" 

 /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/assembler.rb:124:in `and': [:rax, [:rbx, 128]] (NoMatchingPatternError) 
         from /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/insn_compiler.rb:2348:in `opt_and' 
         from /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/insn_compiler.rb:118:in `compile' 
         from /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/compiler.rb:321:in `compile_block' 
         from /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/compiler.rb:150:in `block in branch_stub_hit' 
         from <internal:kernel>:133:in `then' 
         from /home/ukolovda/.rvm/rubies/ruby-3.3.1/lib/ruby/3.3.0/ruby_vm/rjit/compiler.rb:149:in `branch_stub_hit' 
         from -e:1:in `block in <main>' 
         from -e:1:in `upto' 
         from -e:1:in `<main>' 

 ``` 

 Test ruby file: 
 ```ruby 
 # test.rb  
 # Running: ruby --rjit test.rb 
 a = 1 
 1.upto(10) do 
     b = { a1: a&1,  
           a2: a&1,  
           a3: a&1,  
           a4: a&1,  
           a5: a&1,   
           a6: a&1,  
           a7: a&1,  
           a8: a&1, 
     } 
 end 
 ``` 

 (I described it first in #20475, but it is closed now. Current description is more clear and easy reproduce).

Back