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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id D4D2CBC57 for ; Thu, 4 Nov 2010 21:39:50 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqkAAHa30kzRVdQ0k2dsb2JhbACTSjGNfAgVAQEBAQkJCgkRAx+kHItzAQWFMIkHAQSFRopZhXWDKQ X-IronPort-AV: E=Sophos;i="4.58,297,1286143200"; d="scan'208";a="77811578" Received: from mail-vw0-f52.google.com ([209.85.212.52]) by mail2-smtp-roc.national.inria.fr with ESMTP; 04 Nov 2010 21:39:29 +0100 Received: by vws15 with SMTP id 15so1221046vws.39 for ; Thu, 04 Nov 2010 13:39:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:content-type:content-transfer-encoding; bh=so0qSEaPwlCV4eSQOmuVMwYnOC8XDtnCqLy1X59cXLU=; b=fNedsrbYE2YHTqG0BWb6LGx8coVGqSrdnOmRExxKTHeKj9UT4xa/KYH8dP0+4ykxke plQTMke5PUY4/neJNJ6+asO00zpXZKetYKMfuB+jPGCack8rWr0SB2Kp/qxfmjmTLtWE /qCRP0aWZsIcn/0c734v/pxML54QNWvnRJGLs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=cjiaG0HTtxa0QIxGLl8AAYH/IFEO62EA/WTd45ZlcJl9On+4Yzd3KbgS1WRPgD0+Z3 1henTl6ttPg5ESz+6s0je5XokdHZ3I9M3ZfIZWkIXT3RIdpKazyRuKUNN2AeAFa8mot3 zBDPQqs3REcOItw/kCp0kf1osRVSJ8FfV27/w= MIME-Version: 1.0 Received: by 10.229.219.10 with SMTP id hs10mr1065619qcb.238.1288903167908; Thu, 04 Nov 2010 13:39:27 -0700 (PDT) Sender: jamiiecb@googlemail.com Received: by 10.229.187.133 with HTTP; Thu, 4 Nov 2010 13:39:27 -0700 (PDT) In-Reply-To: <201011042125.38754.raphlalou@gmail.com> References: <201011042125.38754.raphlalou@gmail.com> Date: Thu, 4 Nov 2010 20:39:27 +0000 X-Google-Sender-Auth: wEttbDdvuqdZlUab95yfljRIqX0 Message-ID: Subject: Re: [Caml-list] Causes for segfaults From: Jamie Brandon To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; segfaults:01 marshalling:01 segfault:01 marshalling:01 segfaults:01 ocaml:01 ffi:01 -unsafe:01 allocating:01 arrays:01 ocaml:01 netclient:01 compilation:01 beginner's:01 bug:01 I'm not using Obj. I am unmarshalling. I have 'ulimit -s unlimited' set and I'm unmarshalling with the exact same binary that did the marshalling. The unmarshalling itself finishes ok but I guess the segfault could be caused when accessing the resulting data structure? I'm marshalling data which contains a DynArray which in turn contains functional values, but I'm using [Marshal.No_sharing; Marshal.Closures] and I haven't changed the code between marshalling and unmarshalling. On Thu, Nov 4, 2010 at 8:25 PM, Raphael Proust wrote: > Le jeudi 04 novembre 2010 21:19:33, Jamie Brandon a =E9crit : >> Is there an authoritative list anywhere of the possible causes for >> segfaults in ocaml? I'm not using the FFI or -unsafe and I have ruled >> out overflowing the c stack and allocating large strings/arrays. I'm >> using ocaml 3.09.3 with extlib, netclient, json-static, xml-light, str >> and no compilation options. > > Unmarshalling can cause segfaults and Obj.magic too. > > -- > _______ > Rapha=EBl > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >