You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 2725 Reporter: administrator Status: closed Resolution: not a bug Priority: normal Severity: minor Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Andreas Hauser
Version: 3.07+2 and 3.07+19
OS: DragonFly BSD and FreeBSD
Submission from: pd9e96782.dip.t-dialin.net (217.233.103.130)
(* This segfaults on DragonFly and FreeBSD with ocamlopt )
( on Linux or with ocamlc it throws an exception *)
class node =
object
val mutable parent:node option = None
method set_parent p = parent <- p
method path =
match parent with
| Some(p) -> "x" ^ p#path
| None -> ""
end
;;
let n = new node in
n#set_parent (Some(n));
n#path
;;
The text was updated successfully, but these errors were encountered:
(* This segfaults on DragonFly and FreeBSD with ocamlopt )
( on Linux or with ocamlc it throws an exception *)
As the error message says, your code triggers an infinite recursion,
causing a stack overflow.
IIRC, stack overflow detection is disabled under FreeBSD, becauses it
has other side-effects. So the segfault is the expected behaviour.
I wonder if this might be made to work under freebsd 5.2.
Original bug ID: 2725
Reporter: administrator
Status: closed
Resolution: not a bug
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)
Bug description
Full_Name: Andreas Hauser
Version: 3.07+2 and 3.07+19
OS: DragonFly BSD and FreeBSD
Submission from: pd9e96782.dip.t-dialin.net (217.233.103.130)
(* This segfaults on DragonFly and FreeBSD with ocamlopt )
( on Linux or with ocamlc it throws an exception *)
class node =
object
val mutable parent:node option = None
method set_parent p = parent <- p
method path =
match parent with
| Some(p) -> "x" ^ p#path
| None -> ""
end
;;
let n = new node in
n#set_parent (Some(n));
n#path
;;
The text was updated successfully, but these errors were encountered: