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 EF618BB83 for ; Wed, 19 Apr 2006 11:36:16 +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 k3J9aGIj026763 for ; Wed, 19 Apr 2006 11:36:16 +0200 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 LAA31534 for ; Wed, 19 Apr 2006 11:36:15 +0200 (MET DST) Received: from gw-eur4.philips.com (gw-eur4.philips.com [161.85.125.10]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k3J9aF7d028178 for ; Wed, 19 Apr 2006 11:36:15 +0200 Received: from smtpscan-eur5.philips.com (smtpscan-eur5.mail.philips.com [130.144.57.168]) by gw-eur4.philips.com (Postfix) with ESMTP id 4040749769; Wed, 19 Apr 2006 09:36:15 +0000 (UTC) Received: from smtpscan-eur5.philips.com (localhost [127.0.0.1]) by localhost.philips.com (Postfix) with ESMTP id DBA8818B2; Wed, 19 Apr 2006 09:35:26 +0000 (GMT) Received: from smtprelay-eur2.philips.com (smtprelay-eur2.philips.com [130.144.57.171]) by smtpscan-eur5.philips.com (Postfix) with ESMTP id 7B12218BB; Wed, 19 Apr 2006 09:35:26 +0000 (GMT) Received: from ehvrmh02.diamond.philips.com (ehvrmh02-srv.diamond.philips.com [130.139.27.125]) by smtprelay-eur2.philips.com (Postfix) with ESMTP id A346E67; Wed, 19 Apr 2006 09:35:25 +0000 (GMT) In-Reply-To: <4445734B.6030004@free.fr> To: Marc Lasson Cc: caml-list@inria.fr Subject: Re: [Caml-list] Bug in ocamlc or in ocamlrun. MIME-Version: 1.0 X-Mailer: Lotus Notes Release 6.0.3 September 26, 2003 Message-ID: From: Sebastian Egner Date: Wed, 19 Apr 2006 11:33:58 +0200 X-MIMETrack: Serialize by Router on ehvrmh02/H/SERVER/PHILIPS(Release 6.5.3FP1HF291 | September 19, 2005) at 19/04/2006 11:34:23, Serialize complete at 19/04/2006 11:34:23 Content-Type: multipart/alternative; boundary="=_alternative 0034A4DCC1257155_=" X-Miltered: at nez-perce with ID 44460490.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at concorde with ID 4446048F.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; bug:01 ocamlc:01 ocamlrun:01 ocamlc:01 rec:01 failwith:01 ocaml:01 rec:01 failwith:01 ocaml:01 caml-list:01 compile:01 compile:01 define:01 define:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=HTML_40_50,HTML_MESSAGE autolearn=disabled version=3.0.3 This is a multipart message in MIME format. --=_alternative 0034A4DCC1257155_= Content-Type: text/plain; charset="US-ASCII" > When i compile the following program with ocamlc i get a segmentation fault. > [...] > If i replace the function LL.add by > > let rec add a b = match a, b with > [], [] -> [] > | x::a', y::b' -> (R.add x y)::(add a' b') > | _ -> failwith "add" > > the segmentation fault magically disappear. It seems that it is sufficient to define let add a b = List.map2 R.add a b instead of let add = List.map2 R.add to make the segmentation fault disappear (Ocaml 3.09.1). Sebastian. --=_alternative 0034A4DCC1257155_= Content-Type: text/html; charset="US-ASCII"
> When i compile the following program with ocamlc i get a segmentation fault.
> [...]
> If i replace the function LL.add by
>
>  let rec add a b = match a, b with
>      [], [] -> []
>    | x::a', y::b' -> (R.add x y)::(add a' b')
>    | _ -> failwith "add"
>
> the segmentation fault magically disappear.

It seems that it is sufficient to define

        let add a b = List.map2 R.add a b

instead of

        let add = List.map2 R.add

to make the segmentation fault disappear (Ocaml 3.09.1).

Sebastian. --=_alternative 0034A4DCC1257155_=--