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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id DB6557EC41 for ; Wed, 17 Oct 2012 15:33:53 +0200 (CEST) X-IronPort-AV: E=Sophos;i="4.80,600,1344204000"; d="scan'208";a="177630295" Received: from chercheur-124.msr-inria.inria.fr (HELO [10.0.1.2]) ([193.55.250.124]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/AES128-SHA; 17 Oct 2012 15:33:31 +0200 Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1283) From: Damien Doligez In-Reply-To: Date: Wed, 17 Oct 2012 15:33:31 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <52D3E528-32A8-477F-89F6-EFD923EB71D2@inria.fr> References: ,<94BF6DC4A4904A74A1CA3ADE98B0BF75@erratique.ch> To: caml users X-Mailer: Apple Mail (2.1283) Subject: Re: [Caml-list] Segmentation fault from Array.append Hello, > From: Daniel B=FCnzli [daniel.buenzli@erratique.ch] >=20 > http://rwmj.wordpress.com/2010/01/22/tip-tracking-down-ocaml-heap-corrupt= ors/ I have posted a comment to that blog. For the archive, here's what it says: Starting with OCaml 4.00.0, there is an easy way to activate the debug vers= ion of the runtime: 1. configure OCaml with "-with-debug-runtime" 2. compile and install OCaml 3. compile your program with "-runtime-variant d" This will compile your program with a version of the runtime which has asse= rtions all over the place, and does a thorough check of the heap structure = at each major GC (and at each compaction). If you then follow Rich=92s advi= ce, you should be able to narrow down the source of the heap corruption qui= te easily. -- Damien