[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #52977] Octave can be caused to crash with aut
From: |
Olaf Till |
Subject: |
[Octave-bug-tracker] [bug #52977] Octave can be caused to crash with autoload'ed functions |
Date: |
Fri, 26 Jan 2018 07:18:03 -0500 (EST) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
URL:
<http://savannah.gnu.org/bugs/?52977>
Summary: Octave can be caused to crash with autoload'ed
functions
Project: GNU Octave
Submitted by: i7tiol
Submitted on: Fri 26 Jan 2018 12:15:42 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Segfault, Bus Error, etc.
Status: None
Assigned to: None
Originator Name: Olaf Till
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
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.
Reproduce:
- 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:)
#include <octave/oct.h>
DEFUN_DLD (some_function, , , "")
{
return octave_value_list ();
}
- from Octave commandline:
autoload ("some_function", "test_interface.oct")
- from Octave commandline, call:
some_function
- from an external shell commandline:
touch test_interface.oct
- from Octave commandline, call a 2nd time:
some_function
-> 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:
warning: library /home/olaf/devel/src/test/some_function.oct not reloaded due
to existing references)
Program received signal SIGSEGV, Segmentation fault.
octave_value::operator= (address@hidden, a=...)
at ./libinterp/octave-value/ov.h:366
366 rep->count++;
(gdb) bt
#0 octave_value::operator= (address@hidden, a=...)
at ./libinterp/octave-value/ov.h:366
#1 0x00007ffff73d55ed in octave::load_fcn_from_file (
file_name="/home/olaf/octave/parallel-3.1.1/x86_64-pc-linux-gnu-api-v51+/parallel_interface.oct",
dir_name="/home/olaf/octave/parallel-3.1.1/x86_64-pc-linux-gnu-api-v51+",
dispatch_type="", package_name="", fcn_name="", autoload=false)
at libinterp/parse-tree/oct-parse.yy:4753
rest of backtrace varies:
this was what I got in package installation:
#2 0x00007ffff752e800 in octave::fcn_info::fcn_info_rep::find_user_function
(
address@hidden) at libinterp/corefcn/fcn-info.cc:757
and this is from with the described procedure to reproduce the bug:
#2 0x00007ffff7892cde in load_out_of_date_fcn (
ff="/home/olaf/devel/src/test/test_interface.oct", dir_name="",
function=..., dispatch_type="", package_name="")
at libinterp/corefcn/symtab.cc:99
#3 0x00007ffff789609c in octave::out_of_date_check (function=...,
dispatch_type="", address@hidden)
at libinterp/corefcn/symtab.cc:258
#4 0x00007ffff752d911 in octave::fcn_info::fcn_info_rep::find_autoload (
address@hidden) at libinterp/corefcn/fcn-info.cc:712
#5 0x00007ffff75304e7 in octave::fcn_info::fcn_info_rep::xfind (
address@hidden, args=..., address@hidden)
at libinterp/corefcn/fcn-info.cc:504
#6 0x00007ffff7530caf in octave::fcn_info::fcn_info_rep::find (this=0x7b30a0,
args=..., address@hidden)
at libinterp/corefcn/fcn-info.cc:353
#7 0x00007ffff7894303 in find (local_funcs=true, args=...,
this=<optimized out>) at libinterp/corefcn/fcn-info.h:244
#8 octave::symbol_table::fcn_table_find (address@hidden,
name="some_function", args=..., address@hidden)
at libinterp/corefcn/symtab.cc:390
#9 0x00007ffff78911c3 in octave::symbol_scope_rep::find (this=0x687b20,
name="some_function", args=..., address@hidden,
address@hidden) at libinterp/corefcn/symscope.cc:84
#10 0x00007ffff7892ebd in find (local_funcs=true, skip_variables=true,
args=..., name="", this=<optimized out>)
at libinterp/corefcn/symscope.h:655
#11 octave::symbol_table::find (address@hidden,
name="some_function", args=..., address@hidden,
address@hidden) at libinterp/corefcn/symtab.cc:358
#12 0x00007ffff7894855 in octave::symbol_table::find_function (this=0x66ee50,
name="some_function", args=..., address@hidden)
at libinterp/corefcn/symtab.cc:430
#13 0x00007ffff788f22d in octave::symbol_record::find_function (
address@hidden, name="some_function", args=...)
at libinterp/corefcn/symrec.cc:115
#14 0x00007ffff73f5eed in octave::symbol_record::find (
address@hidden, address@hidden, args=...)
at libinterp/corefcn/symrec.h:562
#15 0x00007ffff73e833b in octave::tree_evaluator::visit_identifier (
this=0x66ef10, expr=...) at libinterp/parse-tree/pt-eval.cc:1059
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?52977>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Octave-bug-tracker] [bug #52977] Octave can be caused to crash with autoload'ed functions,
Olaf Till <=