From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 1D4E77EC6E for ; Fri, 20 Dec 2013 17:56:47 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of steph@glondu.net) identity=pra; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="steph@glondu.net"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of steph@glondu.net) identity=mailfrom; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="steph@glondu.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail2-smtp-roc.national.inria.fr: domain of postmaster@redisdead.crans.org designates 138.231.136.39 as permitted sender) identity=helo; client-ip=138.231.136.39; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="steph@glondu.net"; x-sender="postmaster@redisdead.crans.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgABAHl2tFKK54gnl2dsb2JhbABZg0ODWLMsgweBHhYOAQEBAQEIFgc8giYBAQQjVRELGgIFFgsCAgkDAgECAUUTCAKIAASxUph4F4EpjTY6FoJYgUgEmBaGRY57 X-IPAS-Result: AgABAHl2tFKK54gnl2dsb2JhbABZg0ODWLMsgweBHhYOAQEBAQEIFgc8giYBAQQjVRELGgIFFgsCAgkDAgECAUUTCAKIAASxUph4F4EpjTY6FoJYgUgEmBaGRY57 X-IronPort-AV: E=Sophos;i="4.95,521,1384297200"; d="scan'208";a="49923985" Received: from redisdead.crans.org ([138.231.136.39]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 20 Dec 2013 17:56:46 +0100 Received: from [10.125.1.2] (fbx.up7.fr [81.56.96.177]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by redisdead.crans.org (Postfix) with ESMTPSA id 414D22162 for ; Fri, 20 Dec 2013 17:56:46 +0100 (CET) Message-ID: <52B476CC.5020907@glondu.net> Date: Fri, 20 Dec 2013 17:56:44 +0100 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9 MIME-Version: 1.0 To: caml-list@inria.fr References: <20131220152553.GA28797@delli7.univ-savoie.fr> In-Reply-To: <20131220152553.GA28797@delli7.univ-savoie.fr> X-Enigmail-Version: 1.6 OpenPGP: id=49881AD3 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: [Caml-list] Natdynlink segfault Le 20/12/2013 16:25, Christophe Raffalli a =C3=A9crit : > I am encountering a segfault using natdynlink. The picture is >=20 > - program works when a .cmxs containing few modules like lablgl ... is dy= nlinked but some ocamlnet modules are statically linked > - the exactly same program segfaults when handling the first http request= if ocamlnet modules are inside the .cmxs too. >=20 > Remark: I have to compile the main program with -linkall (otherwise some = modules like StdLabels are missing), but the .cmxs > is compiled without -linkall and I do not think some modules are download= ed twice (but I do not know a way to be sure). You can run ocamlobjinfo on .cmxs files to check the set of modules defined by the plugin. To see the list of modules defined in a native executable (let's say =3Docamlc.opt), the following works for me: nm -D =3Docamlc.opt | awk -F'[_ ]+' '{print $3}' | sed -n 's/^caml//p'|sort -u My first check would be to make sure no plugin imports a module defined in the main executable. Cheers, --=20 St=C3=A9phane