Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007421OCamltypingpublic2016-11-25 18:002016-12-10 10:17
Reporterlpw25 
Assigned Togarrigue 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version4.04.0 
Target VersionFixed in Version4.05.0 +dev/beta1/beta2/beta3/rc1 
Summary0007421: Soundness bug with GADTs and lazy
DescriptionThe exhaustivity/refutation checks do not taken into account the hidden _|_ member of the lazy type:

  # type (_, _) eq = Refl : ('a, 'a) eq;;
  type (_, _) eq = Refl : ('a, 'a) eq
  # type empty = (int, unit) eq;;
  type empty = (int, unit) eq
  # let f (x : ('a, empty Lazy.t) result) =
      match x with
      | Ok x -> x
      | Error (lazy _) -> .;;
        val f : ('a, empty Lazy.t) result -> 'a = <fun>
  # (f (Error (lazy (raise Not_found))) : string list list);;
  Segmentation fault
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0016949)
garrigue (manager)
2016-12-10 03:48

Fixed by commit 2608a18.
Do not split in a lazy pattern.
(0016950)
gasche (developer)
2016-12-10 04:38
edited on: 2016-12-10 04:38

Is this really fixed in 2608a18? It doesn't seem related to lazy patterns
  https://github.com/ocaml/ocaml/commit/2608a18 [^]

(I was curious to have a look at the patch. Would you have forgotten to commit it?)

(0016951)
garrigue (manager)
2016-12-10 10:17

Sorry, this was the fix for 0007424.

This PR is actually fixed by commit d8429e5.

- Issue History
Date Modified Username Field Change
2016-11-25 18:00 lpw25 New Issue
2016-12-07 13:54 shinwell Assigned To => garrigue
2016-12-07 13:54 shinwell Status new => assigned
2016-12-10 03:48 garrigue Note Added: 0016949
2016-12-10 03:48 garrigue Status assigned => resolved
2016-12-10 03:48 garrigue Fixed in Version => 4.05.0 +dev/beta1/beta2/beta3/rc1
2016-12-10 03:48 garrigue Resolution open => fixed
2016-12-10 04:38 gasche Note Added: 0016950
2016-12-10 04:38 gasche Note Edited: 0016950 View Revisions
2016-12-10 10:17 garrigue Note Added: 0016951
2017-02-23 16:45 doligez Category OCaml typing => typing


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker