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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id F21F97EC41 for ; Tue, 16 Oct 2012 17:42:34 +0200 (CEST) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of dhouse@janestreet.com) identity=pra; client-ip=38.105.200.115; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dhouse@janestreet.com"; x-sender="dhouse@janestreet.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of dhouse@janestreet.com designates 38.105.200.115 as permitted sender) identity=mailfrom; client-ip=38.105.200.115; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dhouse@janestreet.com"; x-sender="dhouse@janestreet.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@nyc-dmz-mxout2.janestreet.com) identity=helo; client-ip=38.105.200.115; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="dhouse@janestreet.com"; x-sender="postmaster@nyc-dmz-mxout2.janestreet.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgoBAGp/fVAmachzl2dsb2JhbAArGr96KwEBAQEBBhgHO4IgAQEBBBICLAEBNwEPCwsDAwQBAQEuIhIBBQEUCAYTIodiAwEHLJwiCQOKa4MpgQoBBY84BotPhj2VboEVigqDMhYphBCCFg X-IronPort-AV: E=Sophos;i="4.80,593,1344204000"; d="scan'208";a="159242117" Received: from mx2.janestreet.com (HELO nyc-dmz-mxout2.janestreet.com) ([38.105.200.115]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 16 Oct 2012 17:42:33 +0200 Received: from nyc-qsv-mail1.delacy.com ([172.25.22.57]) by nyc-dmz-mxout2.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1TO9Hr-0002RA-QQ for caml-list@inria.fr; Tue, 16 Oct 2012 11:42:31 -0400 Received: from nyc-dmz-mxgoog1.delacy.com ([172.25.224.109] helo=mxgoog1.janestreet.com) by nyc-qsv-mail1.delacy.com with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1TO9Hr-0006yU-Ox for caml-list@inria.fr; Tue, 16 Oct 2012 11:42:31 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]) by mxgoog1.janestreet.com with esmtp (Exim 4.76) (envelope-from ) id 1TO9Hr-0004lD-Kl for caml-list@inria.fr; Tue, 16 Oct 2012 11:42:31 -0400 Received: by mail-we0-f182.google.com with SMTP id x43so5978175wey.27 for ; Tue, 16 Oct 2012 08:42:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=janestreet.com; s=google; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=1ZbbzNCGi1hLyi+NKM4efIHLtdLpwdbrHlKd3WCksoQ=; b=wKrxHDHoewivTT8KTXjjUPbpgiMjINwX/k39MLdEsyeJyVsaGsWY19pK1Uae0IXBP3 Dq54jhqH/q/eafELeM3sqXv7BVGdsiFLxxL8XB9tzCky85K8SGozyyRbh6cnDTk6KbmA e8q6frkIsUX5b7jMs9C2ExCT6qeLUodSzX2+0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:x-originating-ip:in-reply-to:references:date :message-id:subject:from:to:cc:content-type:x-gm-message-state; bh=1ZbbzNCGi1hLyi+NKM4efIHLtdLpwdbrHlKd3WCksoQ=; b=Ej2F3ez3cVblsxlgLi1bJLw+NajVoTn11YrkdfM9EN6sQSY0YQzI3pp/OIjcgKfuBJ RE1zo7MzvMOFJkD1Ol/JeWui60gxpcZh68ytxYqDz30+pKUWvlrUGJq1M66ZIowHC76V 18Ss8XbTvGDTK8oBRHpNcGU48vVrrjv3n2nyy4yvGJ5x7DdK0if+dJ5oL7i/9HT4YbKQ xS1Sr3Dz0Dj+Pw8MyChBD0GKQEtMioKQcy/rxSHeTULS/U7wRJD8AdX8Ay778WIk9Uw3 INF1DmUdJnpHbw/1texTK2wKou7syVPAdEi57gYYkwGKX5f3hw5MK7rmasmB0y0oIRC3 /jfQ== MIME-Version: 1.0 Received: by 10.180.86.202 with SMTP id r10mr32785995wiz.12.1350402151001; Tue, 16 Oct 2012 08:42:31 -0700 (PDT) Received: by 10.180.145.104 with HTTP; Tue, 16 Oct 2012 08:42:30 -0700 (PDT) X-Originating-IP: [80.169.196.210] In-Reply-To: References: Date: Tue, 16 Oct 2012 16:42:30 +0100 Message-ID: From: David House To: Lin Hong Cc: "caml-list@inria.fr" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkbEv+mrBtTKPwR3CjWKNR+ogi/pivU2xrP1ZLgIKveCLcYTB5oc4nJYMYJ+vQZunniQt8q Subject: Re: [Caml-list] Segmentation fault from Array.append By "c stubs" I really mean c functions that you're calling from ocaml. It's very easy to get such things wrong and stamp all over your heap. On Tue, Oct 16, 2012 at 4:41 PM, Lin Hong wrote: > > > if by "c stubs" you mean some function that holding up place but does nothing, we are not doing any of that. > > and yes it's reproducible on one mac, I will test it on other machine with Ocaml4.X.X > > > Thanks, > Lin Hong > American Museum of Natural History > POY website : > https://code.google.com/p/poy/ > http://research.amnh.org/scicomp/scripts/download.php > > ________________________________________ > From: David House [dhouse@janestreet.com] > Sent: Tuesday, October 16, 2012 11:10 AM > To: Lin Hong > Cc: caml-list@inria.fr > Subject: Re: [Caml-list] Segmentation fault from Array.append > > Segfaults in the GC are often the fault of random heap corruption. Are > you using any C stubs that might be at fault here? > > Is the fault reproducable? > > On Tue, Oct 16, 2012 at 4:08 PM, Lin Hong wrote: >> Hi, all >> >> we got a Segmentation fault with Ocaml 4.0.0 and 4.0.1 from append function >> of Array. gdb traceback give us this: >> >> Program received signal EXC_BAD_ACCESS, Could not access memory. >> Reason: KERN_INVALID_ADDRESS at address: 0x0000000107b65000 >> 0x0000000100488840 in mark_slice () >> (gdb) backtrace >> #0 0x0000000100488840 in mark_slice () >> #1 0x0000000100489216 in caml_major_collection_slice () >> #2 0x000000010048984c in caml_check_urgent_gc () >> #3 0x000000010048f26d in caml_array_gather () >> #4 0x000000010048f42e in caml_array_append () >> #5 0x00000001003ef216 in .L363 () >> Previous frame inner to this frame (gdb could not unwind past this frame) >> (gdb) >> >> looks like the error is from array.c >> >> we don't see this problem with Ocaml3.X.X, they have different array >> function in the cside anyway. >> >> Does anyone else have similar problem like this? >> >> >> Thanks in advance for any suggestions. >> >> Cheers, >> Lin Hong >> American Museum of Natural History >> POY website : >> https://code.google.com/p/poy/ >> http://research.amnh.org/scicomp/scripts/download.php