From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id QAA14077; Sat, 8 Jun 2002 16:34:15 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id QAA14082 for ; Sat, 8 Jun 2002 16:34:14 +0200 (MET DST) Received: from holomorphy (holomorphy.com [66.224.33.161]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g58EYDH08378 for ; Sat, 8 Jun 2002 16:34:14 +0200 (MET DST) Received: from wli by holomorphy with local (Exim 3.34 #1 (Debian)) id 17GhI2-0002yk-00; Sat, 08 Jun 2002 07:34:02 -0700 Date: Sat, 8 Jun 2002 07:34:02 -0700 From: William Lee Irwin III To: Alessandro Baretta Cc: Ocaml Subject: Re: [Caml-list] Compiler killer code? Message-ID: <20020608143402.GQ6777@holomorphy.com> References: <3D02156D.7070303@baretta.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Description: brief message Content-Disposition: inline In-Reply-To: <3D02156D.7070303@baretta.com> User-Agent: Mutt/1.3.25i Organization: The Domain of Holomorphy Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Jun 08, 2002 at 04:32:13PM +0200, Alessandro Baretta wrote: > Is the type inference algorithm guaranteed to termintate? I > ask because I have accidentally attempted to evaluate a > (meaningless) function which almost hanged my Athlon. > The killer code is the following: > type t = t -> t > let f (x:t) :t = f f > If I type this into the toplevel, it starts to allocate > memory by the tens of megabytes, until I have to kill it to > prevent a system crash. I let it reach approximately 128MB > before killing it. (BTW, that was with ocaml 3.04+13 > 2002-06-05.) > Is the language really supposed to accept such garbage as > that which I wrote? I get this instead: # type t = t -> t;; The type abbreviation t is cyclic Cheers, Bill ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners