[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #46877] Unreachable return statement after err
From: |
John W. Eaton |
Subject: |
[Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll |
Date: |
Tue, 12 Jan 2016 17:18:20 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.2.1 |
Follow-up Comment #1, bug #46877 (project octave):
I think the right thing to do is to change LEXICAL_ERROR to be a token that
can return the error message back to the parser. Then we can properly report
lexical errors as "parse errors".
Also, I noticed a memory leak. I can reproduce it by creating a script with
an unterminated string constant (that will trigger one of these LEXICAL_ERROR
conditions) and then call that script in a loop like this:
more off
while (true)
try
myscript
catch
fprintf (stderr, "foo-i-hithere\n");
end
end
Simply calling a valid script in the loop doesn't show a leak. Changing the
error message in the lexer to be a warning doesn't fix the problem either, so
I think it is something other than missing error cleanup code if the
LEXICAL_ERROR token is not returned. I'll see if I can also track down why
this leak is happening.
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?46877>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, Rik, 2016/01/11
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll,
John W. Eaton <=
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, Rik, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/12
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, Rik, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14
- [Octave-bug-tracker] [bug #46877] Unreachable return statement after error call in lex.ll, John W. Eaton, 2016/01/14