Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Stéphane Glondu" <steph@glondu.net>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Natdynlink segfault
Date: Fri, 20 Dec 2013 17:56:44 +0100	[thread overview]
Message-ID: <52B476CC.5020907@glondu.net> (raw)
In-Reply-To: <20131220152553.GA28797@delli7.univ-savoie.fr>

Le 20/12/2013 16:25, Christophe Raffalli a écrit :
> I am encountering a segfault using natdynlink. The picture is
> 
> - program works when a .cmxs containing few modules like lablgl ... is dynlinked 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.
> 
> 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 downloaded 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 =ocamlc.opt), the following works for me:

  nm -D =ocamlc.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,

-- 
Stéphane


      reply	other threads:[~2013-12-20 16:56 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-12-20 15:25 Christophe Raffalli
2013-12-20 16:56 ` Stéphane Glondu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52B476CC.5020907@glondu.net \
    --to=steph@glondu.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox