Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005364OCamlOCaml generalpublic2011-09-29 20:482012-09-25 20:07
Reporterjfc 
Assigned Toxleroy 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version3.12.1 
Target VersionFixed in Version3.12.1+dev 
Summary0005364: Crash following pack/unpack/functor application
DescriptionThis is a reduced version of a program I sent to the email list. It crashes whether interpreted or compiled with ocamlc or ocamlopt version 3.12.1 or svn latest ("OCaml version 3.13.0+dev7 (2011-09-22)"), all using amd64 architecture.

The problem may be improper permutation of the fields of a module passed to Hashtbl.Make. In this case a value of type out_channel contains an int. In the original program a value of out_channel was a heap block.
TagsNo tags attached.
Attached Files? file icon all.ml [^] (3,427 bytes) 2011-09-29 20:48 [Show Content]

- Relationships

-  Notes
(0006135)
xleroy (administrator)
2011-09-30 11:16

I confirm the lack of a "thinning" operation on structure representations. The smaller example below shows the issue: no thinning takes place at ((val m : T) : S).

module type S = sig val f: int -> int end

module type T = sig val x: int val f: int -> int end

let m = (module struct let x = 1 let f x = x+1 end : T)

module M = ((val m : T) : S)

let crash = M.f 42
(0006136)
xleroy (administrator)
2011-09-30 11:47

Fixed in SVN trunk and in 3.12 release branch.

- Issue History
Date Modified Username Field Change
2011-09-29 20:48 jfc New Issue
2011-09-29 20:48 jfc File Added: all.ml
2011-09-30 11:16 xleroy Note Added: 0006135
2011-09-30 11:16 xleroy Status new => confirmed
2011-09-30 11:47 xleroy Note Added: 0006136
2011-09-30 11:47 xleroy Assigned To => xleroy
2011-09-30 11:47 xleroy Status confirmed => resolved
2011-09-30 11:47 xleroy Resolution open => fixed
2011-09-30 11:47 xleroy Fixed in Version => 3.12.1+dev
2012-09-25 20:07 xleroy Status resolved => closed


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker