bugGNU Octave - Bugs: bug #49224, error with "help while"

 
 

bug #49224: error with "help while"

Submitted by:  Avinoam Kalma <avinoam>
Submitted on:  Thu 29 Sep 2016 07:32:56 PM UTC  
 
Category: InterpreterSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: AvinoamOpen/Closed: Closed
Release: 4.2.0-rc2Operating System: Any

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 29 Sep 2016 10:48:00 PM UTC, comment #8:

I pushed a fix here http://hg.savannah.gnu.org/hgweb/octave/rev/121e9639b604. Closing report.

Rik <rik5>
Project Administrator
Thu 29 Sep 2016 10:27:52 PM UTC, comment #7:

I relinquish to either of you.

I concur with Rik's findings, the "len" value is negative because the loop to read doc strings hit EOF while it reads the last entry, instead of finding a trailing 0x1d character. Need a way to handle that last entry.

Mike Miller <mtmiller>
Project Administrator
Thu 29 Sep 2016 10:26:23 PM UTC, comment #6:

I think I have a solution. Give me 30 minutes.

Rik <rik5>
Project Administrator
Thu 29 Sep 2016 10:24:20 PM UTC, comment #5:

Rik, Mike: Unless you already see the problem and want to work on it, I'll take a look. I'm sure this is a problem that I introduced when I made Octave look in the DOCSTRINGS files for the help text for built-in functions and keywords.

John W. Eaton <jwe>
Project Administrator
Thu 29 Sep 2016 10:07:27 PM UTC, comment #4:

It IS because "while" is the last entry in the file. I ran under gdb and the text length reported for the docstring was negative. When the negative value gets cast to size_t later it becomes absolutely huge. But in reality, the length of the docstring text should never be negative.

Rik <rik5>
Project Administrator
Thu 29 Sep 2016 09:42:11 PM UTC, comment #3:
  • This bug DOES also happen under Linux with (a self-built) Octave-4.2.0-rc2.
  • This bug does NOT happen under Linux with (also self-built) Octave 4.0.3 release.
Hartmut <hardy>
Thu 29 Sep 2016 09:14:03 PM UTC, comment #2:

Possibly because "while" is the very last entry in the file libinterp/DOCSTRINGS?

I manually editing libinterp/DOCSTRINGS and added a "zzz" entry to the end of the file. Re-running run-octave after that, I can now "help while", but "help zzz" gives the same error.

Mike Miller <mtmiller>
Project Administrator
Thu 29 Sep 2016 08:45:19 PM UTC, comment #1:

Confirmed. It's only 'while' as well. Other keywords like 'for', 'parfor', 'do', 'until' all work.

Rik <rik5>
Project Administrator
Thu 29 Sep 2016 07:32:56 PM UTC, original submission:
Avinoam Kalma <avinoam>
Project Member

 

(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 hardy (Posted a comment)
  • -unavailable- added by mtmiller (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by avinoam (Submitted the item)
  • -unavailable- added by avinoam
  •  

    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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 29 Sep 2016 10:48:00 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
      Operating SystemMicrosoft Windows=>Any
    Thu 29 Sep 2016 08:45:18 PM UTCrik5StatusNone=>Confirmed
    Thu 29 Sep 2016 07:32:56 PM UTCavinoamCarbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1