From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p8TGXfou009616 for ; Thu, 29 Sep 2011 18:33:41 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjkBAHCchE7UGyoCkWdsb2JhbABBDqYZgWgUAQEBAQkLCwcUAyKBUwEBBAEnLCUBBQsLDhMWDwkDAgECAUUGDQEHAQGHdgK5CIcTBJNWhSOLYDk X-IronPort-AV: E=Sophos;i="4.68,462,1312149600"; d="scan'208";a="122177030" Received: from smtp2-g21.free.fr ([212.27.42.2]) by mail1-smtp-roc.national.inria.fr with ESMTP; 29 Sep 2011 18:33:34 +0200 Received: from [192.168.1.3] (unknown [82.237.71.191]) by smtp2-g21.free.fr (Postfix) with ESMTP id 22D474B0137; Thu, 29 Sep 2011 18:33:27 +0200 (CEST) Message-ID: <4E849E44.3050002@inria.fr> Date: Thu, 29 Sep 2011 18:35:16 +0200 From: Xavier Leroy User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.21) Gecko/20110831 Thunderbird/3.1.13 MIME-Version: 1.0 To: John Carr CC: caml-list References: <201109291603.p8TG3FBX006930@outgoing.mit.edu> In-Reply-To: <201109291603.p8TG3FBX006930@outgoing.mit.edu> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Caml-list] Strange crash after switching to first class modules On 09/29/2011 06:03 PM, John Carr wrote: > One sentence summary: I added a local module generated by > functor application to an unpacked first class module and > the runtime blew up. [...] > The last active code in my source is a function that looks like this > in relevant part: > > let format chan x = > let f = Printf.fprintf chan "%s %d" in > begin match x with > | W (n,false) -> f "string" n > end > > Note the partial application of fprintf. Could you first try to eliminate that partial application of fprintf? (Inline f at point of call, or eta-expand yourself.) The Printf module takes a lot of liberties with the type system (ahem), so it is one of the usual suspects in such a case. - Xavier Leroy