[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53925] segfault in debug mode when using TAB-
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #53925] segfault in debug mode when using TAB-complete from readline |
Date: |
Wed, 16 May 2018 19:30:19 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #1, bug #53925 (project octave):
I also see this problem on stable, so if possible it should be fixed there.
It's crashing here in the condition of the while loop in this function in
help.cc:
// Return a vector of all functions from this file,
// for use in command line auto-completion.
string_vector help_system::local_functions (void) const
{
string_vector retval;
call_stack& cs = m_interpreter.get_call_stack ();
octave_user_code *curr_fcn = cs.caller_user_code ();
if (! curr_fcn)
return retval;
// All subfunctions are listed in the top-level function of this file.
while (curr_fcn->is_subfunction ())
{
symbol_scope pscope = curr_fcn->parent_fcn_scope ();
curr_fcn = pscope.function ();
}
// Get subfunctions.
const std::list<std::string> names = curr_fcn->subfunction_names ();
size_t sz = names.size ();
retval.resize (sz);
// Loop over them.
size_t i = 0;
for (const auto& nm : names)
retval(i++) = nm;
return retval;
}
The value of curr_fcn is NULL. You are stopped in a subfunction, so finding
the ultimate parent function should be possible.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53925>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/