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

Segfault in object system #4560

Closed
vicuna opened this Issue Jun 4, 2008 · 1 comment

Comments

Projects
None yet
1 participant
@vicuna
Copy link
Collaborator

vicuna commented Jun 4, 2008

Original bug ID: 4560
Reporter: palomer
Status: closed (set by @garrigue on 2008-06-04T07:32:46Z)
Resolution: fixed
Priority: normal
Severity: crash
Version: 3.09.1
Fixed in version: 3.10.3+dev
Category: -for Caml light use https://github.com/camllight/camllight/issues
Has duplicate: #4561
Related to: #3576

Bug description

The following program segfaults in ocamlc.opt version 3.09. It has been verified by others

class c1 =
object (self)
method b =
object
method c =
object
method d = self # b
end
end
end

class c2 =
object
inherit c1
method a = ()
end

let _ = new c2 # b
let _ = new c1 # b # c # d

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jun 4, 2008

Comment author: @garrigue

#3576 was not completely solved. Namely, method ids were correctly handled
only when they were coming from the immediately enclosing class, without
extra nesting.
The problem here is that, since method ids do not appear in the typing
environment, there is no clean way to check for which ones are bound.
The solution aopted here is to use a reference, adding method ids when
private method calls are done, and removing them when a class defines them.

@vicuna vicuna closed this Jun 4, 2008

@vicuna vicuna added the caml-light label Mar 14, 2019

@vicuna vicuna added the bug label Mar 19, 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.