changeset 28560:af1a9c1db88e stable

reset pointer to lvalue list before executing commands (bug #58748, bug #58751) * pt-eval.cc (tree_evaluator::visit_statement): Set m_lvalue_list to nullptr when executing commands. From Fernando Alvarruiz.
author John W. Eaton <jwe@octave.org>
date Sun, 12 Jul 2020 16:59:52 -0400
parents c9f7d1d7a6e7
children 2de5389fc5ab dce34ad6a6ea
files libinterp/parse-tree/pt-eval.cc
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/libinterp/parse-tree/pt-eval.cc	Sat Jul 11 14:52:10 2020 +0200
+++ b/libinterp/parse-tree/pt-eval.cc	Sun Jul 12 16:59:52 2020 -0400
@@ -3078,7 +3078,12 @@
         try
           {
             if (cmd)
-              cmd->accept (*this);
+              {
+                unwind_protect_var<const std::list<octave_lvalue> *>
+                  upv (m_lvalue_list, nullptr);
+
+                cmd->accept (*this);
+              }
             else
               {
                 if (m_echo_state)