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

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

[Octave-bug-tracker] [bug #60209] octave crashes when some .oct files ar


From: anonymous
Subject: [Octave-bug-tracker] [bug #60209] octave crashes when some .oct files are updated
Date: Wed, 10 Mar 2021 12:39:31 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/89.0.4389.82 Safari/537.36

URL:
  <https://savannah.gnu.org/bugs/?60209>

                 Summary: octave crashes when some .oct files are updated
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Wed 10 Mar 2021 05:39:29 PM UTC
                Category: Interpreter
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Segfault, Bus Error, etc.
                  Status: None
             Assigned to: None
         Originator Name: David
        Originator Email: david4lists@gmail.com
             Open/Closed: Open
                 Release: 6.2.0
         Discussion Lock: Any
        Operating System: GNU/Linux

    _______________________________________________________

Details:

A .oct file derived from the crashtest.cpp source code below causes octave to
crash when it is run, updated (ie, the file is modified), and run again with
this error on my Ubuntu 20.04 system with octave 6.2.0 built and installed
from source:

fatal: caught signal Segmentation fault -- stopping myself...
Segmentation fault (core dumped)

Contents of crashtest.cpp which was copied from the example here:
https://octave.org/doc/v6.1.0/Getting-Started-with-Oct_002dFiles.html
with the addition of one line which includes <armadillo>

#include <octave/oct.h>
#include <armadillo>
using namespace std;
DEFUN_DLD (crashtest, args, nargout,
           "Hello World Help String")
{
  octave_stdout << "First version of Hello World has "
                << args.length () << " input arguments and "
                << nargout << " output arguments.\n";
  octave_value_list retval (nargout);
  for (int i = 0; i < nargout; i++)
    retval(i) = octave_value (Matrix ());

  return retval;
}


The way I reliably reproduce this problem is to:
1) compile like this:
mkoctfile -o crashtesttmp crashtest.cpp
cp crashtesttmp.oct crashtest.oct
2) start octave and call crashtest()
3) from another shell, recopy crashtest.oct:
cp crashtesttmp.oct crashtest.oct
4) from the shell running the octave session, call crashtest() again.

For me, this causes octave to reliably crash. Recompiling without going
through the crashtesttmp.oct intermediate file doesn't crash but instead
outputs a message like this:
warning: library /tmp/crashtest.oct not reloaded due to existing references





    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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