Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006674OCaml~DO NOT USE (was: OCaml general)public2014-11-25 14:102016-12-07 11:37
Reporterfrisch 
Assigned Tomaranget 
PriorityhighSeveritycrashReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version4.03.0+dev / +beta1 
Summary0006674: "index out of bounds" when compiling pattern matching on long sum type
DescriptionOn trunk, but not on 4.02, I get the following exception:

Fatal error: exception Invalid_argument("index out of bounds")

when compiling (with ocamlc) the code below:

type t =
  | A1
  | A2
  | A3
  | A4
  | A5
  | A6
  | A7
  | A8
  | A9
  | A10
  | A11
  | A12
  | A13
  | A14
  | A15
  | A16
  | A17
  | A18
  | A19
  | A20
  | A21
  | A22
  | A23
  | A24
  | A25
  | A26
  | A27
  | A28
  | A29
  | A30
  | A31
  | A32
  | X of string

let f = function
  | X _ -> true
  | _ -> false



Here is the top of the stacktrace:

Raised by primitive operation at file "bytecomp/switch.ml", line 746, characters 2-22
Called from file "bytecomp/switch.ml", line 840, characters 21-36
Called from file "bytecomp/switch.ml", line 862, characters 5-35
Called from file "bytecomp/matching.ml", line 2469, characters 21-108
Called from file "bytecomp/matching.ml", line 2743, characters 28-64
Re-raised at file "bytecomp/matching.ml", line 2717, characters 10-46
Called from file "bytecomp/matching.ml", line 2793, characters 6-145
Called from file "bytecomp/matching.ml", line 2977, characters 30-73
Called from file "bytecomp/translcore.ml", line 1090, characters 7-88
...
TagsNo tags attached.
Attached Files

- Relationships
related to 0006646closedmaranget Extremely long compile times and/or compiler hanging on relatively trivial sized program. 

-  Notes
(0012575)
frisch (developer)
2014-11-25 14:19

Most certainly related to revision 15570.
(0012576)
frisch (developer)
2014-11-25 14:28

Probably not the intended fix, but removing the test "List.length fail_pats < 32" in matching.ml (always going to the "true" branch) removes the problem.
(0012577)
maranget (manager)
2014-11-25 16:14

Fixed in the trunk, thanks.


--Luc

- Issue History
Date Modified Username Field Change
2014-11-25 14:10 frisch New Issue
2014-11-25 14:19 frisch Note Added: 0012575
2014-11-25 14:21 frisch Relationship added related to 0006646
2014-11-25 14:28 frisch Note Added: 0012576
2014-11-25 16:14 maranget Note Added: 0012577
2014-11-25 16:14 maranget Assigned To => maranget
2014-11-25 16:14 maranget Reproducibility have not tried => always
2014-11-25 16:14 maranget Status new => resolved
2014-11-25 16:14 maranget Resolution open => fixed
2014-11-25 16:14 maranget Fixed in Version => 4.03.0+dev / +beta1
2016-12-07 11:37 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker