bugGNU Octave - Bugs: bug #64849, Octave throws an 'error:...

 
 

bug #64849: Octave throws an 'error: add_breakpoints_in_function' under certain conditions

Submitter:  None
Submitted:  Fri 03 Nov 2023 11:07:52 AM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Unexpected Error or Warning
Status:  Fixed Assigned to:  None
Originator Name:  Originator Email:  -email is unavailable-
Open/Closed:  * Closed Release:  * dev
Operating System:  * Any Fixed Release:  None
Planned Release:  9.1.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Thu 16 Nov 2023 07:07:41 PM UTC, comment #6: 

I added a commit message and pushed your change to the default branch:
https://hg.savannah.gnu.org/hgweb/octave/rev/7bd4d95bcb7a

I followed up with a minor clean-up:
https://hg.savannah.gnu.org/hgweb/octave/rev/dbd61008ed75

Marking as ready for test.

Markus Mützel <mmuetzel>
Group administrator
Thu 16 Nov 2023 09:03:26 AM UTC, comment #5: 

I am experiencing the same problem in the Dynare testsuite. I confirm that the patch in comment #2 fixes the issue.

Sébastien Villemot <svillemot>
Sun 12 Nov 2023 04:35:22 PM UTC, comment #4: 

Thanks for the review.

For the change log:
Peter Konowski - -email is unavailable-

Anonymous
Sun 12 Nov 2023 09:35:05 AM UTC, comment #3: 

Your proposed change looks good to me. Thank you for tracking this down and providing a fix. 👍

We usually push changes with the credentials of the contributor (i.e., (full) name and email address). Would you like to share that information?

Markus Mützel <mmuetzel>
Group administrator
Sun 12 Nov 2023 05:20:10 AM UTC, comment #2: 

The issue is caused by recent changes in bp-table.cc (break point table handling): In certain cases the function parameter flag "silent" of "remove_all_breakpoints" was ignored.

This flag silent is used by the out_of_date_check function, which calls "remove_all_breakpoints" with "silent = true".

(pkg load uses "common_size" which was replaced by the OCT function via "out_of_date_check" and then Octave threw the observed error as the flag silent was ignored)


A patch is attached which solves the issue.

(file #55319)

Anonymous
Sat 04 Nov 2023 01:13:40 PM UTC, comment #1: 

After bisecting the problem:
 

The issue has been introduced with changeset 32410:554a932fc6d0. Before this commit, the described error did not occur.

Anonymous
Fri 03 Nov 2023 11:07:52 AM UTC, original submission:  

I have a sub-directory which contains an OCT compiled function. This function shadows the core function common_size (I am aware of the implications).

Case a) throws error
====================
When octave is started, a pkg (it could be any!) is loaded, the sub-directory added (which gives correctly a warning) and then the function is called the FIRST time, octave throws an error:
 

pkg load io;
addpath("./OCT");
[a1,a2,a3] = common_size(1,1);


results in


warning: function ..../OCT/common_size.oct shadows a core library function
error: add_breakpoints_in_function: unable to find function 'common_size'




When the same command is executed on the command line after the error for a SECOND time, it works without throwing an error and any times afterwards.

[a1,a2,a3] = common_size(1,1)
a1 = 0
a2 = 1
a3 = 1



case b) works without any problems
==================================
When no package is loaded after octave start, it works without any problem:

addpath("./OCT");
[a1,a2,a3] = common_size(1,1);


warning: function ..../OCT/common_size.oct shadows a core library function
a1 = 0
a2 = 1
a3 = 1



Anonymous

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #55319:  64849.patch added by None (1KiB - text/x-patch)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rik5 (Updated the item)
  • -email is unavailable- added by svillemot (Posted a comment)
  • -email is unavailable- added by mmuetzel (Posted a comment)
  •  

    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 9 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-01-12 rik5 StatusReady For Test Fixed
        Open/ClosedOpen Closed
    2023-11-16 mmuetzel StatusPatch Reviewed Ready For Test
    2023-11-12 mmuetzel CategoryNone Interpreter
        Item GroupNone Unexpected Error or Warning
        StatusNone Patch Reviewed
        Operating SystemGNU/Linux Any
        Planned ReleaseNone 9.1.0
    2023-11-12 None Attached File- Added 64849.patch, #55319

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code