Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007847OCamllexing and parsingpublic2018-09-03 04:122018-09-06 10:18
Assigned Togasche 
PlatformOSOS Version
Product Version4.07.0 
Target VersionFixed in Version4.08.0+dev/beta1 
Summary0007847: new parser hangs on some syntax errors
DescriptionThe following code results in a hang (in, around line 109):

external x : unit -> (int,int)`A.t = "x"
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
gasche (administrator)
2018-09-03 06:11

Thanks for the report!

The nontermination comes from the Parse.loop function, which seems to hit the HandlingError case infinitely often instead of progressing towards Rejected.
gasche (administrator)
2018-09-03 16:28

smuenzel-js: out of curiosity, how did you hit this issue? I'm curious at whether this comes from tests that you are running on your own, or casual usage of trunk. In any case, this is very useful.
hhugo (reporter)
2018-09-03 17:03

The is the result of some experiment with afl fuzz
gasche (administrator)
2018-09-03 17:59

Interesting! I hope that the harness setup will be made available for others to play with.

(I have a perpetually-delayed side-project idea to do differential testing of OCaml implementations by combining [^] (the evaluation-order-aware code generator) and [^] (or another reference implementation.)
gasche (administrator)
2018-09-06 10:18

After some debugging by Frédéric Bour and myself, the issue was fixed by François Pottier in trunk: [^]

We believe that no other similar issue should pop up in the future with the current grammar, as it is due to a corner case (raising a parser-internal exception from a semantic action) which has now disappeared from the grammar.

Thanks again for the prompt testing and reporting!

- Issue History
Date Modified Username Field Change
2018-09-03 04:12 smuenzel-js New Issue
2018-09-03 06:11 gasche Note Added: 0019329
2018-09-03 16:28 gasche Note Added: 0019335
2018-09-03 16:58 gasche Status new => confirmed
2018-09-03 17:03 hhugo Note Added: 0019336
2018-09-03 17:59 gasche Note Added: 0019338
2018-09-06 10:18 gasche Note Added: 0019342
2018-09-06 10:18 gasche Status confirmed => resolved
2018-09-06 10:18 gasche Fixed in Version => 4.08.0+dev/beta1
2018-09-06 10:18 gasche Resolution open => fixed
2018-09-06 10:18 gasche Assigned To => gasche

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker