From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id 2AABFBC29 for ; Wed, 9 Aug 2006 16:32:22 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k79EWLQ4018144 for ; Wed, 9 Aug 2006 16:32:21 +0200 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA10989 for ; Wed, 9 Aug 2006 16:32:21 +0200 (MET DST) Received: from [128.93.11.101] (buzet.inria.fr [128.93.11.101]) by nez-perce.inria.fr (8.13.6/8.13.6) with ESMTP id k79EWEsb018127 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 9 Aug 2006 16:32:15 +0200 Message-ID: <44D9F18B.8070906@inria.fr> Date: Wed, 09 Aug 2006 16:30:35 +0200 From: Alain Frisch User-Agent: Thunderbird 1.5.0.2 (X11/20060501) MIME-Version: 1.0 To: Jeremy Yallop Cc: caml-list@inria.fr Subject: Re: [Caml-list] non-recursive recursive module segfault References: <44D9E864.4000303@ed.ac.uk> In-Reply-To: <44D9E864.4000303@ed.ac.uk> X-Enigmail-Version: 0.94.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-j-chkmail-Score: MSGID : 44D9F1F5.001 on nez-perce : j-chkmail score : X : 0/20 1 X-j-chkmail-Score: MSGID : 44D9F1EE.000 on nez-perce : j-chkmail score : X : 0/20 1 X-Miltered: at nez-perce with ID 44D9F1F5.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 44D9F1EE.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; frisch:01 frisch:01 recursive:01 segfault:01 rec:01 sig:01 val:01 struct:01 recursive:01 segfaults:01 bug:01 cvs:01 cvs:01 camlcvs:01 cvsweb:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 Jeremy Yallop wrote: > What behaviour should I expect for the following code? : > > module rec M : > sig > val m : unit -> unit > end > = > struct > let h _ _ = () > let m = h () > end > > let _ = M.m () > > According to the documentation this could trigger the exception > "Undefined_recursive_module", but instead it segfaults. That's probably the bug 4008: http://caml.inria.fr/mantis/view.php?id=4008 which is fixed in the 3.09 CVS branch (but not in the 3.10 branch, in case you tried). To get rid of the problem, you can either: - use the CVS version (release309 branch); - download, compile and link with the following files: http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/~checkout~/ocaml/stdlib/camlinternalMod.mli?rev=1.1.8.2 http://camlcvs.inria.fr/cgi-bin/cvsweb.cgi/~checkout~/ocaml/stdlib/camlinternalMod.ml?rev=1.4.2.1 - use ocamlopt -- Alain