octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #65240] The byte-code interpreter gets out of


From: Petter
Subject: [Octave-bug-tracker] [bug #65240] The byte-code interpreter gets out of sync and does not release memory in certain cases
Date: Sun, 4 Feb 2024 18:15:50 -0500 (EST)

Follow-up Comment #1, bug#65240 (group octave):

Thanks for the bug report. I am able to replicate the issue.

Replacing one ~ with e.g. 'foo' seems to remove the leak.

I've found the issue to be that if there are multiple stack frames in a row
that have an ignore output in them,
the stack frame will leak, due to a "lvalue list" not being deleted.

I've attached a patch that seems to solve the issue.


Fix leak of frames in bytecode interpreter with nested ignored outputs (bug
#65240)

If a function had a ignore output, e.g. "[~, b] = foo ()", and so did 'foo',
the stack frames would not be destroyed due to a stray lvalue list not being
deleted.

* pt-bytecode-vm.cc: Rearange to use new field
* pt-bytecode-vm.h: (m_v_lvalue_list_childs) New field
                    Remove unused fields and member functions
                    Move ctor functionality to push_frame()
* bytecode_leaks.m: New test


(file #55667)

    _______________________________________________________

Additional Item Attachment:

File name: 33444.patch                    Size:9 KB
    <https://file.savannah.gnu.org/file/33444.patch?file_id=55667>


    AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-fbaac37df3d8a2d00c0e0f24c57debca19cad51c.tar.gz


    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?65240>

_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]