# HG changeset patch # User Rik # Date 1400167013 25200 # Node ID fc43c8017e9ba4e4b166ed9f0338af5d2f1db487 # Parent 5f37573a6868ea2136a244720b6474d4c1c91bb3 Fix infinite loop when using builtin ("keyboard") (bug #33296). * toplev.cc (octave_call_stack::do_goto_frame_relative): If call stack increment is 0 (not dbup, nor dbdown, but keyboard function), choose an increment of -1 to eventially break out of while (1) loop. diff -r 5f37573a6868 -r fc43c8017e9b libinterp/corefcn/toplev.cc --- a/libinterp/corefcn/toplev.cc Wed May 14 20:29:06 2014 -0700 +++ b/libinterp/corefcn/toplev.cc Thu May 15 08:16:53 2014 -0700 @@ -446,6 +446,8 @@ break; } } + else if (incr == 0) // Break out of infinite loop by choosing an incr. + incr = -1; // There is no need to set scope and context here. That will // happen when the dbup/dbdown/keyboard frame is popped and we