[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 03:39:28 -0500 (EST) |
Follow-up Comment #11, bug#64783 (group octave):
Here is a possible fix. make check is clean, at least for my configuration.
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 09:22:45 2024 +0100
@@ -6415,6 +6415,14 @@
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 ();
+ 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
- [Octave-bug-tracker] [bug #64783] bytecode interpreter: Default number of output arguments not 1 for anonymous functions,
Fernando <=
Message not available