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 RAA17082; Thu, 21 Mar 2002 17:20:47 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id RAA15501 for caml-list@pauillac.inria.fr; Thu, 21 Mar 2002 17:20:47 +0100 (MET) 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 QAA14602 for ; Thu, 21 Mar 2002 16:22:19 +0100 (MET) Received: from penguin.housemarque.fi (www.housemarque.fi [212.213.160.98]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g2LFMIT14614 for ; Thu, 21 Mar 2002 16:22:18 +0100 (MET) Received: from rudolph.housemarque.fi ([192.168.42.2] helo=frodo ident=root) by penguin.housemarque.fi with smtp (Exim 3.00 #1) id 16o4Lb-0006u3-00 for caml-list@inria.fr; Thu, 21 Mar 2002 17:19:23 +0200 Message-ID: <000701c1d0ec$db7b6180$422aa8c0@housemarque.fi> From: "Vesa Karvonen" To: Subject: [Caml-list] Bug in Hashtbl ? Date: Thu, 21 Mar 2002 17:27:05 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, The following program raises an Out_of_memory exception. Is this: - correct behavior, - bug in Ocaml 3.04, - bug somewhere else? <--- weird_out_of_memory.ml ---> type vertex = | D of vertex list let _ = let rec n0 = D [n1] and n1 = D [n0] in let vertices = [n0;n1] in let res = Hashtbl.create 0 in List.iter (fun v -> assert (not (Hashtbl.mem res v)) ; Hashtbl.add res v (ref 0)) vertices ; () <--- weird_out_of_memory.ml ---> Under Cygwin (1.3.10): $ ocamlc.opt -o a.exe -g weird_out_of_memory.ml $ a.exe Fatal error: exception Out_of_memory Raised from a C function Called from module Weird_out_of_memory, character 220 Called from module List, character 1856 Called from module Weird_out_of_memory, character 270 Regards, Vesa Karvonen ------------------- 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