bugGNU Octave - Bugs: bug #38485, Segfault when using 'run history'...

 
 

bug #38485: Segfault when using 'run history' twice

Submitted by:  Rik <rik5>
Submitted on:  Fri 08 Mar 2013 05:00:09 AM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
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.

 

(Jump to the original submission Jump to the original submission)

Thu 16 May 2013 07:38:54 PM UTC, comment #6:

This problem seems to be fixed on the default branch by the following changeset so I'm closing this report.

http://hg.savannah.gnu.org/hgweb/octave/rev/428da5debfe4

John W. Eaton <jwe>
Project Administrator
Sat 09 Mar 2013 06:00:27 AM UTC, comment #5:

John,

Thanks for the useful pointer. Sorry, I did
not think of that myself.

Michael Godfrey <godfrey>
Project Member
Sat 09 Mar 2013 05:51:56 AM UTC, comment #4:

To ignore repeated commands, check out the

function.

John W. Eaton <jwe>
Project Administrator
Sat 09 Mar 2013 05:47:06 AM UTC, comment #3:

Just omitting run_history makes good sense
and should be easy. Not entering more than
one copy of repeated commands seems reasonable
in its own right. I think that some shells do that.

Michael Godfrey <godfrey>
Project Member
Sat 09 Mar 2013 05:41:31 AM UTC, comment #2:

Maybe as for

the

command should be omitted from the history list?

As I remember it, the inspiration for these commands came from the "fc" function in bash, and that is also omitted from the history list (in bash).

John W. Eaton <jwe>
Project Administrator
Sat 09 Mar 2013 02:53:41 AM UTC, comment #1:

Would it make sense to unconditionally delete duplicate
adjoining entries?

Michael Godfrey <godfrey>
Project Member
Fri 08 Mar 2013 05:00:09 AM UTC, original submission:

Using 'run history' twice in a row leads to a segfault. The first invocation runs the previous command, whatever it was. The second invocation executes the previous command which is 'run history' and an infinite loop is generated. This isn't a common occurrence, but it isn't great behavior by the interpreter either.

Sample Code:

Rik <rik5>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by jwe (Posted a comment)
  • -unavailable- added by godfrey (Posted a comment)
  • -unavailable- added by rik5 (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
    Thu 16 May 2013 07:38:54 PM UTCjweStatusNone=>Fixed
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1