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 23678BDCB for ; Thu, 8 Sep 2005 11:42:03 +0200 (CEST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j889g2xC015414 for ; Thu, 8 Sep 2005 11:42:02 +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 LAA03703 for ; Thu, 8 Sep 2005 11:42:02 +0200 (MET DST) Received: from pih-relay04.plus.net (pih-relay04.plus.net [212.159.14.131]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j889g1s7015409 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO) for ; Thu, 8 Sep 2005 11:42:02 +0200 Received: from [80.229.56.224] (helo=chetara) by pih-relay04.plus.net with esmtp (Exim) id 1EDIut-0002cF-2J for caml-list@inria.fr; Thu, 08 Sep 2005 10:41:59 +0100 From: Jon Harrop Organization: Flying Frog Consultancy Ltd. To: caml-list@inria.fr Subject: Shortest hanging Date: Thu, 8 Sep 2005 04:50:49 +0100 User-Agent: KMail/1.7.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200509080450.50695.jon@ffconsultancy.com> X-Miltered: at nez-perce with ID 4320076A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 43200769.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; ocaml:01 rec:01 rec:01 c-c:01 bytecode:01 val:01 frog:98 equality:01 polymorphic:01 hangs:02 guess:02 latter:03 latter:03 let:03 let:03 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 Whilst trying to find the shortest OCaml program that hangs, I came up with: let rec f() = f() in f();; and: let rec x = 1::x in x=x;; Curiously, you can interrupt the former with C-C but not the latter when run in the top level?! I guess the latter is stuck in polymorphic equality within the run time system, where it doesn't check for interruption, whereas the former cycles around inside the bytecode interpreter. But how come the signal isn't raised inside compare_val? -- Dr Jon D Harrop, Flying Frog Consultancy Ltd. http://www.ffconsultancy.com