Issue #12613 has been updated by Nobuyoshi Nakada.

Description updated
Backport changed from 2.1: UNKNOWN, 2.2: REQUIRED, 2.3: REQUIRED to 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED

r57368 would be better, to backport at least.

----------------------------------------
Bug #12613: iseq_set_sequence: adjust bug -1 < 0 (retry inside begin/rescue)
https://bugs.ruby-lang.org/issues/12613#change-62542

* Author: Joao Carlos Mendes Luis
* Status: Closed
* Priority: Normal
* Assignee: Koichi Sasada
* Target version: 
* ruby -v: ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]
* Backport: 2.1: REQUIRED, 2.2: REQUIRED, 2.3: REQUIRED, 2.4: REQUIRED
----------------------------------------
Code:

~~~ruby
while true
  begin
    p "loop"
    raise
  rescue
    p "Risen"
    retry
  else
    retry
  end
  break
end
~~~

Output:

~~~
[BUG] iseq_set_sequence: adjust bug -1 < 0
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

-- Control frame information -----------------------------------------------
c:0001 p:0000 s:0002 E:0021a0 (none) [FINISH]

-- C level backtrace information -------------------------------------------
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(rb_vm_bugreport+0xc29) [0x7f5d33138689] vm_dump.c:688
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(rb_compile_bug_str+0xae) [0x7f5d32fc963e] error.c:497
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(iseq_setup+0x142b) [0x7f5d3310dadb] compile.c:1801
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(rb_iseq_compile_node+0x146) [0x7f5d3310e0b6] compile.c:654
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(rb_iseq_new_with_opt+0x94) [0x7f5d33117724] iseq.c:474
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(rb_iseq_new_main+0x5a) [0x7f5d33117a6a] iseq.c:445
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(process_options+0x8e5) [0x7f5d330a5375] ruby.c:1612
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(ruby_process_options+0xe8) [0x7f5d330a5aa8] ruby.c:2093
/home/jonny/.rvm/rubies/ruby-2.3.1/lib/libruby.so.2.3(ruby_options+0xb7) [0x7f5d32fd3807] eval.c:103
/home/jonny/.rvm/rubies/ruby-2.3.1/bin/ruby(main+0x43) [0x4008c3] main.c:36

-- Other runtime information -----------------------------------------------

~~~

(Lots of info removed here)

~~~

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html
~~~



---Files--------------------------------
ruby_2.4.0.crash (11.3 KB)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>