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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 490BDBC57 for ; Fri, 3 Sep 2010 16:59:08 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.56,313,1280700000"; d="scan'208";a="68827753" Received: from 250-120.msr-inria.inria.fr (HELO [10.0.1.2]) ([193.55.250.120]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 03 Sep 2010 16:59:06 +0200 Subject: Re: [Caml-list] Re: Segfaults with Dynlink with OCaml 3.11 Mime-Version: 1.0 (Apple Message framework v1081) Content-Type: text/plain; charset=us-ascii From: Damien Doligez In-Reply-To: Date: Fri, 3 Sep 2010 16:59:02 +0200 Cc: Paul Steckler Content-Transfer-Encoding: 7bit Message-Id: <4723F435-333B-4E7C-9226-2EE4F9D7B805@inria.fr> References: To: caml-list caml-list X-Mailer: Apple Mail (2.1081) X-Spam: no; 0.00; segfaults:01 dynlink:01 ocaml:01 damien:01 damien:01 steckler:01 segfault:01 segfaults:01 bug:01 bug:01 repro:98 doligez:01 doligez:01 wrote:01 dynamically:01 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