bugGNU Octave - Bugs: bug #64702, VM machine has issues with...

 
 

bug #64702: VM machine has issues with shorthand assignment operators for global variables

Submitter:  None
Submitted:  Thu 21 Sep 2023 04:35:35 AM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  None
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * GNU/Linux Fixed Release:  None
Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sun 01 Oct 2023 04:40:08 PM UTC, comment #3: 

No complaints from CI. Closing as fixed.

Arun Giridhar <arungiridhar>
Group Member
Sat 23 Sep 2023 03:23:53 PM UTC, comment #2: 
Arun Giridhar <arungiridhar>
Group Member
Sat 23 Sep 2023 12:19:00 AM UTC, comment #1: 


VM Fix compound subassignment of globals (bug #64702)

Also fix some other places with the same potential problem.

* libinterp/parse-tree/pt-bytecode-vm.cc: Ref, deref properly
* test/compile/bytecode.tst: Update tests
* test/compile/bytecode_global_1.m




(file #55161)

Petter <petter>
Thu 21 Sep 2023 04:35:35 AM UTC, original submission:  

VM machine has issues with shorthand and assignment operators for global variables.
 
It throws an error
'error: can't perform indexing operations for global value reference type'.

Normal assignment does work without any issues.


script "test2.m"
------------------------------------------------

   global TT;

   sz = [5,1];
   TT = zeros(sz);
   idx = 1:3;
   TT (idx)  = TT (idx) + 5;
   disp(TT);

   printf("\n");
   TT (idx)  += 5;
   disp(TT);

--------------------------------------------------

_enable_vm_eval_ (0);
source test2.m


   5
   5
   5
   0
   0

   10
   10
   10
    0
    0


_enable_vm_eval_ (1);
source test2.m

_enable_vm_eval_ (1);
source test2.m
   5
   5
   5
   0
   0

error: can't perform indexing operations for global value reference type
error: called from
    test2.m at line 10 column 4


Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #55161:  octave_32320.patch added by petter (5KiB - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by arungiridhar (Posted a comment)
  • -email is unavailable- added by petter (Updated the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2023-10-01 arungiridhar StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-09-23 arungiridhar StatusNone Ready For Test
    2023-09-23 petter Attached File- Added octave_32320.patch, #55161

    Back to the top

    Powered by Savane 3.13-3e34.
    Corresponding source code