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

Recursive value check consider unboxed constructor as having statically known size. #7717

vicuna opened this issue Jan 31, 2018 · 1 comment


Copy link

vicuna commented Jan 31, 2018

Original bug ID: 7717
Reporter: @chambart
Assigned to: @chambart
Status: resolved (set by @chambart on 2018-02-01T21:00:04Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 4.06.0
Fixed in version: 4.07.0+dev/beta2/rc1/rc2
Category: typing

Bug description

The Typecore.classify_expression considers Texp_construct as a construction of statically known size, even for unboxed constructors. The provided example Segfaults.

Steps to reproduce

type a = A of b [@@unboxed]
and b = X of a | Y

let rec a =
(if Sys.opaque_identity true then
X a

let v =
match a with
| A (X (A (X v))) ->
| _ -> a

Copy link

vicuna commented Feb 1, 2018

Comment author: @yallop

Thanks for the report, chambart! There's a PR to fix this issue here:


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

No branches or pull requests

2 participants