Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OCaml 4.14 infinit loops while building odoc-parser #10762

Closed
kit-ty-kate opened this issue Nov 10, 2021 · 1 comment · Fixed by #10771
Closed

OCaml 4.14 infinit loops while building odoc-parser #10762

kit-ty-kate opened this issue Nov 10, 2021 · 1 comment · Fixed by #10771
Milestone

Comments

@kit-ty-kate
Copy link
Member

Reproductible with a simple opam install odoc-parser. e.g. with docker:

$ docker run --rm -it ocaml/opam:debian-11-ocaml-4.14
opam@4bca9a9111d3:~$ opam install odoc-parser
The following actions will be performed:
  - install ocamlfind   1.9.1  [required by astring]
  - install dune        2.9.1  [required by odoc-parser]
  - install ocamlbuild  0.14.0 [required by astring]
  - install result      1.5    [required by odoc-parser]
  - install topkg       1.0.4  [required by astring]
  - install astring     0.8.5  [required by odoc-parser]
  - install odoc-parser 0.9.0
[...]

Screenshot 2021-11-10 at 11 30 30

The file it infinit loops on is src/token.ml: https://github.com/ocaml-doc/odoc-parser/blob/626ccc9e319d7d3cc67251425ddbb48e33bc2de8/src/token.ml

@lthls
Copy link
Contributor

lthls commented Nov 10, 2021

Minimal repro:

type style = [ `Bold | `Italic ]
type t = [ `Begin_style of style ]
let print : [< t ] -> unit = function
  | `Begin_style `Bold -> ()
  | `Begin_style `Italic -> ()

The infinite loop happens somewhere in a call to Parmatch.check_unused.
Bisecting the issue points to commit 2250fd8

@dra27 dra27 added this to the 4.14.0 milestone Nov 10, 2021
Octachron added a commit to Octachron/ocaml that referenced this issue Nov 15, 2021
kit-ty-kate pushed a commit to kit-ty-kate/ocaml that referenced this issue Nov 15, 2021
Octachron added a commit that referenced this issue Nov 16, 2021
typechecker, #10762: restrict redo in unify_row_field
Octachron added a commit that referenced this issue Nov 16, 2021
typechecker, #10762: restrict redo in unify_row_field

(cherry picked from commit 75de898)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants