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

Crash in translmod.ml #7928

Closed
vicuna opened this issue Feb 20, 2019 · 2 comments
Closed

Crash in translmod.ml #7928

vicuna opened this issue Feb 20, 2019 · 2 comments

Comments

@vicuna
Copy link

vicuna commented Feb 20, 2019

Original bug ID: 7928
Reporter: @stedolan
Assigned to: @lpw25
Status: resolved (set by @gasche on 2019-02-20T21:22:25Z)
Resolution: duplicate
Priority: normal
Severity: minor
Version: 4.08.0+dev/beta1/beta2
Category: middle end (typedtree to clambda)
Duplicate of: #7920
Monitored by: @nojb

Bug description

The following program (shortened from lm_parser.ml in omake) causes ocamlopt to fail with an index out of bounds error:

module type A = sig type t end
module type Int = A with type t = int
module I : Int = struct type t = int end
module A : sig module X : Int end = struct module X = I end

The failure occurs on both 4.08 and trunk, but only with ocamlopt and not ocamlc. The backtrace is:

Fatal error: exception Invalid_argument("index out of bounds")
Raised by primitive operation at file "bytecomp/translmod.ml", line 895, characters 46-55
Called from file "list.ml", line 92, characters 20-23
Called from file "bytecomp/translmod.ml", line 991, characters 36-54
Called from file "bytecomp/translmod.ml", line 1012, characters 27-112
Called from file "bytecomp/translmod.ml", line 1190, characters 4-69
Called from file "bytecomp/translobj.ml", line 131, characters 13-18
Called from file "bytecomp/translmod.ml", line 1264, characters 18-65
Called from file "utils/misc.ml", line 31, characters 8-15
Re-raised at file "utils/misc.ml", line 45, characters 40-48
Called from file "driver/optcompile.ml", line 66, characters 2-94
Called from file "driver/optcompile.ml", line 66, characters 2-162
Called from file "utils/misc.ml", line 31, characters 8-15
Re-raised at file "utils/misc.ml", line 45, characters 40-48
Called from file "driver/compile_common.ml", line 124, characters 6-68
Called from file "utils/misc.ml", line 31, characters 8-15
Re-raised at file "utils/misc.ml", line 45, characters 40-48
Called from file "utils/misc.ml", line 31, characters 8-15
Re-raised at file "utils/misc.ml", line 45, characters 40-48
Called from file "driver/compenv.ml", line 597, characters 6-59
Called from file "list.ml", line 110, characters 12-15
Called from file "driver/compenv.ml", line 673, characters 2-61
Called from file "driver/optmain.ml", line 267, characters 6-163
Re-raised at file "parsing/location.ml", line 904, characters 22-25
Called from file "driver/optmain.ml", line 333, characters 6-37
Called from file "driver/optmain.ml", line 337, characters 2-9

@vicuna
Copy link
Author

vicuna commented Feb 20, 2019

Comment author: @gasche

Thanks for the report! It was already reported as #7920, but this is motivating me to do a round of review on Leo's patch to get it merged in good time for a second beta.

@vicuna vicuna closed this as completed Feb 20, 2019
@vicuna
Copy link
Author

vicuna commented Feb 20, 2019

Comment author: @stedolan

Bleurgh, I had a look but I'm not sure how I missed that one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants