From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id EE5D6BC0B for ; Wed, 17 Jan 2007 17:32:05 +0100 (CET) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l0HGW49w026497 for ; Wed, 17 Jan 2007 17:32:05 +0100 Received: by wx-out-0506.google.com with SMTP id i26so2525638wxd for ; Wed, 17 Jan 2007 08:32:04 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=XMAkM+z4mI+N9M16np3YvGHaokheGasd+RCXZTJlgTzgqV6R6XgvNQtpu4hDB9hF8ys1Vt/Fi/X5G+0KRLFIRMH06+KsCO82B6OS2YYTzDmy8n5na9r+s5SryFvbpskuNM8H8r1CPuc5UVNIoo15M1RmOqpiyZpPFM4LnzsX1Dc= Received: by 10.90.100.2 with SMTP id x2mr6321915agb.1169051524371; Wed, 17 Jan 2007 08:32:04 -0800 (PST) Received: by 10.90.72.8 with HTTP; Wed, 17 Jan 2007 08:32:04 -0800 (PST) Message-ID: <95513600701170832j30a8b0b3h9a0f0a25a8bd4f8c@mail.gmail.com> Date: Wed, 17 Jan 2007 17:32:04 +0100 From: "Olivier Andrieu" Sender: oandrieu@gmail.com To: "=?ISO-8859-1?Q?Daniel_B=FCnzli?=" Subject: Re: [Caml-list] marshaling limits Cc: "Sebastien Ferre" , caml-list@yquem.inria.fr In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <2a1a1a0c0701161248l5a1d9ad9q739da9c593fc5219@mail.gmail.com> <45ADE8FE.5070004@irisa.fr> <45AE41C7.8080409@univ-paris12.fr> <45AE43A9.3090904@irisa.fr> X-Google-Sender-Auth: c42e699a8ad8893c X-Miltered: at discorde with ID 45AE4F84.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; andrieu:01 oandrieu:01 marshaling:01 bunzli:01 buenzli:01 bytecode:01 malloc:01 marshalling:01 malloc:01 segfaults:01 marshalling:01 stack:01 recursion:01 stack:01 bytecode:01 On 1/17/07, Daniel B=FCnzli wrote: > > Le 17 janv. 07 =E0 16:41, Sebastien Ferre a =E9crit : > > > pourtant, je passe bien par un appel a output_value > > dans un fichier, sans passer par une chaine intermediaire. > > Maybe output_value uses a string internally. Try with a bytecode > version of your executable, an exception should be raised (or have a > look at the implementaiton of output_value). output_value doesn't use a string internally, it uses malloc. Anyway, if the marshalling function runs out of memory (wether because malloc returns NULL or because the caml string is too large), an Out_of_memory exception is raised. If it segfaults, that's most probably because the marshalling runs out of executable stack (because of too much recursion). I've seen it do this before. The "fix" is to increase the maximum size of the executable stack. The behavior is the same with bytecode or native code since it's not the interpreter's stack that overflows, it's the C one.