[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #64783] bytecode interpreter: Default number o
From: |
Fernando |
Subject: |
[Octave-bug-tracker] [bug #64783] bytecode interpreter: Default number of output arguments not 1 for anonymous functions |
Date: |
Fri, 9 Feb 2024 06:50:57 -0500 (EST) |
Follow-up Comment #12, bug#64783 (group octave):
I realized we need to check if the cs-list is empty. Here is the fix again:
diff -r 3904d7116c8c libinterp/parse-tree/pt-bytecode-vm.cc
--- a/libinterp/parse-tree/pt-bytecode-vm.cc Thu Feb 01 23:34:35 2024 -0500
+++ b/libinterp/parse-tree/pt-bytecode-vm.cc Fri Feb 09 12:40:34 2024 +0100
@@ -6415,6 +6415,15 @@
ret_anon:
{
+ // Don't allow a comma-separated list to escape (see bug #64783).
+ octave_value &ret = TOP_OV ();
+ if (ret.is_cs_list ())
+ {
+ const octave_value_list lst = ret.list_value ();
+ if (!lst.empty ())
+ ret = lst(0);
+ }
+
// We need to tell the bytecode frame we are unwinding so that it can
save
// variables on the VM stack if it is referenced from somewhere else.
m_tw->get_current_stack_frame ()->vm_unwinds ();
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?64783>
_______________________________________________
Mensaje enviado vía Savannah
https://savannah.gnu.org/
Message not available
Message not available
Message not available
Message not available
Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- Message not available
- [Octave-bug-tracker] [bug #64783] bytecode interpreter: Default number of output arguments not 1 for anonymous functions,
Fernando <=