bugGNU Octave - Bugs: bug #45092, lexer panic from syntax error in...

 
 

bug #45092: lexer panic from syntax error in M-file

Submitted by:  Andreas Weber <andy1978>
Submitted on:  Wed 13 May 2015 08:37:19 AM UTC  
 
Category: InterpreterSeverity: 4 - Important
Priority: 5 - NormalItem Group: Segfault, Bus Error, etc.
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: devOperating 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 14 May 2015 09:14:18 AM UTC, comment #8:

Thanks. Closing report

Andreas Weber <andy1978>
Project Member
Thu 14 May 2015 08:13:55 AM UTC, comment #7:

I checked in this second changeset. Ultimately, I think the fix was really just to remove the assert.

http://hg.savannah.gnu.org/hgweb/octave/rev/e679dc89e64b

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 09:13:27 PM UTC, comment #6:

Sorry, my change was probably made to hastily. I don't know what I was thinking, but yeah, keywords should probably be allowed as structure field names. Fixing that will require a little more refactoring so that the is_keyword_token function doesn't set the at_beginning_of_statement flag. I'll fix this, but it will probably not happen until later tonight or tomorrow.

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 08:57:05 PM UTC, comment #5:

According to the documentation for functions()

So the quick and obvious thing to do would be to change the field name to something that is not 'function'. In fact, I think this would be clearer. Again, according to the documentation,

I propose using a field called 'fcnname' or 'name' or 'fcn_name' or maybe 'fname' but that last one looks like filename.

Rik <rik5>
Project Administrator
Wed 13 May 2015 07:52:27 PM UTC, comment #4:

After this C'set the initial problem is solved but now test ov-fcn-handle.cc-tst fails (fntests.log at the end).

The problem is this example code

which now fails with

Reopening bugreport.

fntests.log:

Andreas Weber <andy1978>
Project Member
Wed 13 May 2015 07:39:26 PM UTC, comment #3:

Fixed. Closing report.

Rik <rik5>
Project Administrator
Wed 13 May 2015 06:21:37 PM UTC, comment #2:

I checked in the following changeset.

http://hg.savannah.gnu.org/hgweb/octave/rev/f185653b2f5e

John W. Eaton <jwe>
Project Administrator
Wed 13 May 2015 03:06:17 PM UTC, comment #1:

Confirmed.

I changed the Severity from Minor to Important because the parser should never segfault, even for unexpected or badly formatted input.

Rik <rik5>
Project Administrator
Wed 13 May 2015 08:37:19 AM UTC, original submission:

hg id 2ae4a7ef4378

create a file foo.m

and run 'foo' from Octave gives

I stumbled over this because "lookfor" parses all m-files in the current working directory and stops with the above error because there is unfinished code in some files.

Andreas Weber <andy1978>
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 rik5 (Posted a comment)
  • -unavailable- added by rik5
  • -unavailable- added by andy1978 (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 9 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 14 May 2015 09:14:18 AM UTCandy1978StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Wed 13 May 2015 07:52:27 PM UTCandy1978StatusFixed=>Ready For Test
      Open/ClosedClosed=>Open
    Wed 13 May 2015 07:39:26 PM UTCrik5StatusConfirmed=>Fixed
      Open/ClosedOpen=>Closed
    Wed 13 May 2015 03:06:17 PM UTCrik5Severity2 - Minor=>4 - Important
      StatusNone=>Confirmed
    Wed 13 May 2015 03:04:35 PM UTCrik5Carbon-Copy-=>Added jwe

    Back to the top


    Powered by Savane 3.1-cleanup1