Bad syntax causes program abort

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Bad syntax causes program abort

Ladislav Marek
Hi,
code causes gst to abort:

Object extend [
    foo

outputs:

gst: gst-parse.c:211: lex_lookahead: Assertion `p->la_size == 0 ||
token (p, p->la_size - 1) != (-1)' failed.
test.st:2: Aborted
test.st:2: Error occurred while not in byte code interpreter!!
/usr/local/bin/../lib/libgst.so.7(+0x61307)[0x7f069b9d5307]
/lib/libc.so.6(+0x321e0)[0x7f069afb71e0]
/lib/libc.so.6(gsignal+0x35)[0x7f069afb7165]
/lib/libc.so.6(abort+0x180)[0x7f069afb9f70]
/lib/libc.so.6(__assert_fail+0xf1)[0x7f069afb02b1]
/usr/local/bin/../lib/libgst.so.7(+0x17e16)[0x7f069b98be16]
/usr/local/bin/../lib/libgst.so.7(+0x184f6)[0x7f069b98c4f6]
/usr/local/bin/../lib/libgst.so.7(+0x18abc)[0x7f069b98cabc]
/usr/local/bin/../lib/libgst.so.7(+0x18df0)[0x7f069b98cdf0]
/usr/local/bin/../lib/libgst.so.7(+0x192f3)[0x7f069b98d2f3]
Aborted

It should output syntax error.

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bad syntax causes program abort

Paolo Bonzini-2
On 12/03/2011 04:09 PM, Ladislav Marek wrote:

> Hi,
> code causes gst to abort:
>
> Object extend [
>      foo
>
> outputs:
>
> gst: gst-parse.c:211: lex_lookahead: Assertion `p->la_size == 0 ||
> token (p, p->la_size - 1) != (-1)' failed.
> test.st:2: Aborted
> test.st:2: Error occurred while not in byte code interpreter!!
> /usr/local/bin/../lib/libgst.so.7(+0x61307)[0x7f069b9d5307]
> /lib/libc.so.6(+0x321e0)[0x7f069afb71e0]
> /lib/libc.so.6(gsignal+0x35)[0x7f069afb7165]
> /lib/libc.so.6(abort+0x180)[0x7f069afb9f70]
> /lib/libc.so.6(__assert_fail+0xf1)[0x7f069afb02b1]
> /usr/local/bin/../lib/libgst.so.7(+0x17e16)[0x7f069b98be16]
> /usr/local/bin/../lib/libgst.so.7(+0x184f6)[0x7f069b98c4f6]
> /usr/local/bin/../lib/libgst.so.7(+0x18abc)[0x7f069b98cabc]
> /usr/local/bin/../lib/libgst.so.7(+0x18df0)[0x7f069b98cdf0]
> /usr/local/bin/../lib/libgst.so.7(+0x192f3)[0x7f069b98d2f3]
> Aborted
>
> It should output syntax error.

Fixed.  Doing 3-token lookahead was looking past EOF when the 2nd token
was EOF.  I changed it to only fetch the nth token after looking at the
(n-1)th.

Paolo


_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk
Reply | Threaded
Open this post in threaded view
|

Re: Bad syntax causes program abort

Ladislav Marek
Thanks

On Wed, Dec 14, 2011 at 17:08, Paolo Bonzini <[hidden email]> wrote:

> On 12/03/2011 04:09 PM, Ladislav Marek wrote:
>>
>> Hi,
>> code causes gst to abort:
>>
>> Object extend [
>>     foo
>>
>> outputs:
>>
>> gst: gst-parse.c:211: lex_lookahead: Assertion `p->la_size == 0 ||
>> token (p, p->la_size - 1) != (-1)' failed.
>> test.st:2: Aborted
>> test.st:2: Error occurred while not in byte code interpreter!!
>> /usr/local/bin/../lib/libgst.so.7(+0x61307)[0x7f069b9d5307]
>> /lib/libc.so.6(+0x321e0)[0x7f069afb71e0]
>> /lib/libc.so.6(gsignal+0x35)[0x7f069afb7165]
>> /lib/libc.so.6(abort+0x180)[0x7f069afb9f70]
>> /lib/libc.so.6(__assert_fail+0xf1)[0x7f069afb02b1]
>> /usr/local/bin/../lib/libgst.so.7(+0x17e16)[0x7f069b98be16]
>> /usr/local/bin/../lib/libgst.so.7(+0x184f6)[0x7f069b98c4f6]
>> /usr/local/bin/../lib/libgst.so.7(+0x18abc)[0x7f069b98cabc]
>> /usr/local/bin/../lib/libgst.so.7(+0x18df0)[0x7f069b98cdf0]
>> /usr/local/bin/../lib/libgst.so.7(+0x192f3)[0x7f069b98d2f3]
>> Aborted
>>
>> It should output syntax error.
>
>
> Fixed.  Doing 3-token lookahead was looking past EOF when the 2nd token was
> EOF.  I changed it to only fetch the nth token after looking at the (n-1)th.
>
> Paolo
>

_______________________________________________
help-smalltalk mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-smalltalk