diff options
author | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2020-03-07 09:57:02 +0000 |
---|---|---|
committer | nagachika <nagachika@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2020-03-07 09:57:02 +0000 |
commit | 4ccfb9d123338bdf2f89d1f37025da27c312b3c3 (patch) | |
tree | 483b2a56bd8a46d679577c43232fb117f9810d1f /test | |
parent | 773b45bcc86861c30db135a2c558444ca7193761 (diff) |
merge revision(s) c4794ed73ad348a61a7cfbe3da0a7eb49ba46eb9: [Backport #16641]
Avoid jumping to a wrong destination
when the next insn is already compiled by former branches.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_6@67840 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_jit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_jit.rb b/test/ruby/test_jit.rb index 7fe58ea336..ca74c2a212 100644 --- a/test/ruby/test_jit.rb +++ b/test/ruby/test_jit.rb @@ -763,6 +763,16 @@ class TestJIT < Test::Unit::TestCase end; end + def test_jump_to_precompiled_branch + assert_eval_with_jit("#{<<~'begin;'}\n#{<<~'end;'}", stdout: ".0", success_count: 1, min_calls: 1) + begin; + def test(foo) + ".#{foo unless foo == 1}" if true + end + print test(0) + end; + end + def test_clean_so if appveyor_mswin? skip 'Removing so file is failing on AppVeyor mswin due to Permission Denied.' |