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 QAA13916; Sat, 8 Jun 2002 16:26:56 +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 QAA13854 for ; Sat, 8 Jun 2002 16:26:55 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from athlon.baretta.com (r-mi214-6a28.tin.it [62.211.4.28]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g58EQsH08153 for ; Sat, 8 Jun 2002 16:26:54 +0200 (MET DST) Received: from baretta.com (localhost.localdomain [127.0.0.1]) by athlon.baretta.com (Postfix) with ESMTP id 4D612273E4 for ; Sat, 8 Jun 2002 16:32:14 +0200 (CEST) Message-ID: <3D02156D.7070303@baretta.com> Date: Sat, 08 Jun 2002 16:32:13 +0200 From: Alessandro Baretta Organization: Baretta srl -- www.baretta.com User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0rc1) Gecko/20020417 X-Accept-Language: it, en MIME-Version: 1.0 To: Ocaml Subject: [Caml-list] Compiler killer code? Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk 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? Alex ------------------- 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