diff libinterp/corefcn/stack-frame.cc @ 29064:336356206de7 stable

don't clear stack frame values indirectly through call stack (bug #59432) * pt-eval.cc (tree_evaluator::execute_user_function): Save reference to current stack frame in unwind_action instead of using call_stack::clear_current_frame_values. * call-stack.h, call-stack.cc (call_stack::clear_current_frame_values): Delete unused function. * stack-frame.cc (stack_frame::clear_values): Issue warning instead of calling panic_impossible.
author John W. Eaton <jwe@octave.org>
date Fri, 13 Nov 2020 20:38:28 -0500
parents c5953e65c6aa
children be19672a3c49 1a20cb5be8da
line wrap: on
line diff
--- a/libinterp/corefcn/stack-frame.cc	Fri Nov 13 16:24:56 2020 -0500
+++ b/libinterp/corefcn/stack-frame.cc	Fri Nov 13 20:38:28 2020 -0500
@@ -1074,14 +1074,13 @@
     return new scope_stack_frame (tw, scope, index, parent_link, static_link);
   }
 
-  // This function is only implemented for user_fcn stack frames and
-  // only called for those objects using unwind_protect and the
-  // call_stack::clear_current_frame_values function.  Anything else
-  // indicates an error in the implementation.
+  // This function is only implemented and should only be called for
+  // user_fcn stack frames.  Anything else indicates an error in the
+  // implementation, but we'll simply warn if that happens.
 
   void stack_frame::clear_values (void)
   {
-    panic_impossible ();
+    warning ("invalid call to stack_frame::clear_values; please report");
   }
 
   symbol_info_list