Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0007704OCamltypingpublic2018-01-04 00:492018-01-10 05:55
Reporteryallop 
Assigned Togarrigue 
PrioritynormalSeveritycrashReproducibilityalways
StatusresolvedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.06.1+dev 
Summary0007704: Soundness issue with private rows and module inclusion
DescriptionWith OCaml 4.06.0:

   $ cat pr.ml
   module M : sig
     type t = private [> `A of string ]
     val x : t
   end =
   struct
     type t = private [> `A of string | `B ]
     let x = `B
   end

   let _ = match M.x with `A s -> s

   $ ocaml pr.ml
   Segmentation fault
Additional InformationInspired by PR7703
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
(0018807)
lpw25 (developer)
2018-01-04 11:56

This seems to have appeared between 4.02.3 and 4.03.0.
(0018810)
garrigue (manager)
2018-01-05 06:15

Well, to be more precise, matching on an open polymorphic variant type without a default case should raise a warning, so this is not directly related to modules.

Here is a smaller example.

type t = private [> `A of string ];;
function (`A x : t) -> x;;

This might be related to the refinement of Parmatch for GADTs, but it's not immediate why, I will look into it.
(0018811)
garrigue (manager)
2018-01-05 06:52

Fix in GPR#1559: https://github.com/ocaml/ocaml/pull/1559 [^]

Someone review please...
(0018812)
yallop (developer)
2018-01-05 09:36

> this is not directly related to modules

Oops -- indeed. Thanks for the diagnosis & fix.
(0018819)
garrigue (manager)
2018-01-09 08:50

Fixed in trunk and 4.06 branch by commits bd1b5a0 and 9d52b4c79.
(0018820)
garrigue (manager)
2018-01-10 05:55

Open a new PR (https://github.com/ocaml/ocaml/pull/1564 [^]) to provide better naming for the tags.

- Issue History
Date Modified Username Field Change
2018-01-04 00:49 yallop New Issue
2018-01-04 11:56 lpw25 Note Added: 0018807
2018-01-05 06:15 garrigue Note Added: 0018810
2018-01-05 06:15 garrigue Assigned To => garrigue
2018-01-05 06:15 garrigue Status new => assigned
2018-01-05 06:52 garrigue Note Added: 0018811
2018-01-05 09:36 yallop Note Added: 0018812
2018-01-09 08:50 garrigue Note Added: 0018819
2018-01-09 08:50 garrigue Status assigned => resolved
2018-01-09 08:50 garrigue Fixed in Version => 4.06.1+dev
2018-01-09 08:50 garrigue Resolution open => fixed
2018-01-10 05:55 garrigue Note Added: 0018820


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker