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

Closed
vicuna opened this Issue Jan 31, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

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 =
A
(if Sys.opaque_identity true then
X a
else
Y)

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

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Feb 1, 2018

Comment author: @yallop

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

#1593

@vicuna vicuna closed this Feb 1, 2018

@vicuna vicuna added the typing label Mar 14, 2019

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.