bugGNU Octave - Bugs: bug #52977, Octave can be caused to crash with...


bug #52977: Octave can be caused to crash with autoload'ed functions

Submitted by:  Olaf Till <i7tiol>
Submitted on:  Fri 26 Jan 2018 12:15:42 PM UTC  
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: Patch SubmittedAssigned to: None
Originator Name: Olaf TillOpen/Closed: Open
Release: devOperating System: GNU/Linux

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Tue 06 Feb 2018 06:10:45 AM UTC, comment #1:

Same bug is triggered with

get_help_text ("somename")

if somename.oct is a file intended to be autoloaded with an alias.

This happens in installation of packages with such files, since Octaves builtin "__list_functions__" doesn't handle autoloads if called with a directory argument. (So that was triggers the bug is probably a bug itself. A different issue.)

The fix for the original bug (the segfault), enabling installation of such packages again, is checking if the loaded function is zero before using it. A small changeset is attached.

(file #43190)

Olaf Till <i7tiol>
Project Member
Fri 26 Jan 2018 12:15:42 PM UTC, original submission:

Octave version (development branch):
c241918d4c92, 2018-01-19 08:09:21 -0800

Octave can be caused to crash with autoload'ed functions.

The same (?) thing, with identical upper 2 frames of the backtrace,
happened to me in installation of a package with autoload'ed
functions, causing me to construct this procedure to reproduce
(hopefully the same) bug without package installation.


- for an arbitrary single DEFUN_DLD function "some_function" in file "test_interface.cc", build "test_interface.oct".
(for example this minimal function in file test_interface.cc:)
- from Octave commandline:
- from Octave commandline, call:
- from an external shell commandline:
- from Octave commandline, call a 2nd time:
-> crash

(Hint: In the test case, this possibly happened because with the alias 'autoload ("name_1", "name_2.oct")' the file was re-loaded after increasing modification time, while ordinarily (without an alias, and the file beeing named 'some_function.oct') only a warning is displayed:

rest of backtrace varies:

this was what I got in package installation:

and this is from with the described procedure to reproduce the bug:

Olaf Till <i7tiol>
Project Member


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

Attach File(s):

Attached Files
file #43190:  fix-52977.cset added by i7tiol (915B - application/octet-stream)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -unavailable- added by i7tiol (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 06 Feb 2018 06:11:11 AM UTCi7tiolStatusNone=>Patch Submitted
    Tue 06 Feb 2018 06:10:45 AM UTCi7tiolAttached File-=>Added fix-52977.cset, #43190

    Back to the top

    Powered by Savane 3.1-cleanup1