English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    
Browse thread
Segfaults with Dynlink with OCaml 3.11
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Damien Doligez <damien.doligez@i...>
Subject: Re: [Caml-list] Re: Segfaults with Dynlink with OCaml 3.11

On 2010-08-25, at 06:00, Paul Steckler wrote:

> Today, I found the culprit.  Here's the pattern:
> 
>   dynamically load .cmxs file
>   query list mutated by .cmxs file      (* no problem *)
>   Gc.set { (Gc.get()) with Gc.minor_heap_size         = ...};
>   Gc.set { (Gc.get()) with Gc.major_heap_increment = ... };
>   query mutated list   (* segfault! *)
> 
> If I move the Gc.set's to the program initialization code, before the
> loading of dynamic code, no segfaults occur.

I bet the second Gc.set doesn't matter, and if you replace them with
Gc.minor () you get the same behaviour.

> Is this expected behavior?

Definitely not.  You should file a bug report here, preferably with
a complete repro case:
> Bug reports: http://caml.inria.fr/bin/caml-bugs


-- Damien