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

 
 

bug #49224: error with "help while"

Submitter:  Avinoam Kalma <avinoam>
Submitted:  Thu 29 Sep 2016 07:32:56 PM UTC
   
 
Category:  Interpreter Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Incorrect Result
Status:  Fixed Assigned to:  None
Originator Name:  Avinoam Open/Closed:  * Closed
Release:  * 4.2.0-rc2 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

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>
Group 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>
Group Member
Thu 29 Sep 2016 10:26:23 PM UTC, comment #6: 

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

Rik <rik5>
Group 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>
Group 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>
Group 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>
Group Member
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>
Group administrator
Thu 29 Sep 2016 07:32:56 PM UTC, original submission:  



>> help while
error: out of memory or dimension too large for Octave's index type
error: called from
    help at line 95 column 18


Avinoam Kalma <avinoam>
Group Member

 

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

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jwe (Posted a comment)
  • -email is unavailable- added by hardy (Posted a comment)
  • -email is unavailable- added by mtmiller (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by avinoam (Submitted the item)
  • -email is unavailable- added by avinoam
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-29 rik5 StatusConfirmed Fixed
        Open/ClosedOpen Closed
        Operating SystemMicrosoft Windows Any
    2016-09-29 rik5 StatusNone Confirmed
    2016-09-29 avinoam Carbon-Copy- Added -email is unavailable-

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code