From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 4C808BB84 for ; Thu, 19 Jun 2008 23:51:34 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqQAACtxWkhCm3xrnWdsb2JhbACSTAEBAQEBCA0HnXc X-IronPort-AV: E=Sophos;i="4.27,674,1204498800"; d="scan'208";a="14132547" Received: from janestcapital.com (HELO smtp.janestcapital.com) ([66.155.124.107]) by mail1-smtp-roc.national.inria.fr with ESMTP; 19 Jun 2008 23:51:33 +0200 Received: from qsmtp.delacy.com [38.105.200.250] by janestcapital.com with ESMTP (SMTPD-9.10) id A4E40748; Thu, 19 Jun 2008 17:51:32 -0400 Received: from nyc-qws-011.delacy.com ([172.25.131.111] helo=nyc-qws-011) by qsmtp.delacy.com with smtp (Exim 4.62) (envelope-from ) id 1K9S2V-0001rd-BQ; Thu, 19 Jun 2008 17:51:32 -0400 Received: by nyc-qws-011 (sSMTP sendmail emulation); Thu, 19 Jun 2008 17:51:31 -0400 From: "Mark Shinwell" Date: Thu, 19 Jun 2008 17:51:31 -0400 To: Raj Bandyopadhyay Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Segfault in Garbage collector code: any ideas? Message-ID: <20080619215131.GM30596@janestcapital.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i X-Spam: no; 0.00; shinwell:01 segfault:01 camlparam:01 segfault:01 low-level:01 interfacing:01 garbage:01 wrote:01 caml-list:01 unsafe:01 checking:02 seems:03 latter:03 macro:03 chapter:04 On Thu, Jun 19, 2008 at 04:45:27PM -0500, Raj Bandyopadhyay wrote: > 1) From past experience, this sort of thing seems to occur when > I forget to use a CAMLparam/local/return macro somewhere. However, I > have looked over my C code several times and can't find any such > problem. Is there any other scenario where this sort of segfault can > occur? One thing worth checking is that you've used a Store_field statement rather than attempting to use Field (...) as an lvalue. The latter is often unsafe (see Rule 6 of "Low-level interface" in the Interfacing C chapter of the manual). Mark