* [Caml-list] Natdynlink segfault
@ 2013-12-20 15:25 Christophe Raffalli
2013-12-20 16:56 ` Stéphane Glondu
0 siblings, 1 reply; 2+ messages in thread
From: Christophe Raffalli @ 2013-12-20 15:25 UTC (permalink / raw)
To: Caml list
[-- Attachment #1: Type: text/plain, Size: 683 bytes --]
Dear List members,
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).
Any idea ?
If I have time, I will try to reproduce the pb using a small ocamlnet example.
Christophe
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] Natdynlink segfault
2013-12-20 15:25 [Caml-list] Natdynlink segfault Christophe Raffalli
@ 2013-12-20 16:56 ` Stéphane Glondu
0 siblings, 0 replies; 2+ messages in thread
From: Stéphane Glondu @ 2013-12-20 16:56 UTC (permalink / raw)
To: caml-list
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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-12-20 16:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-20 15:25 [Caml-list] Natdynlink segfault Christophe Raffalli
2013-12-20 16:56 ` Stéphane Glondu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox