|Anonymous | Login | Signup for a new account||2018-09-25 00:50 CEST|
|Main | My View | View Issues | Change Log | Roadmap|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0007847||OCaml||lexing and parsing||public||2018-09-03 04:12||2018-09-06 10:18|
|Target Version||Fixed in Version||4.08.0+dev|
|Summary||0007847: new parser hangs on some syntax errors|
|Description||The following code results in a hang (in Parse.ml, around line 109):|
external x : unit -> (int,int)`A.t = "x"
|Tags||No tags attached.|
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.
|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.|
|The is the result of some experiment with afl fuzz|
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 https://github.com/jmid/efftester [^] (the evaluation-order-aware code generator) and https://github.com/johnwhitington/ocamli [^] (or another reference implementation.)
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!
|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|
|2018-09-06 10:18||gasche||Resolution||open => fixed|
|2018-09-06 10:18||gasche||Assigned To||=> gasche|
|Copyright © 2000 - 2011 MantisBT Group|