Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Paul Steckler <steck@stecksoft.com>
To: Mark Shinwell <mshinwell@janestreet.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Segfaults with Dynlink with OCaml 3.11
Date: Mon, 23 Aug 2010 22:12:53 +1000	[thread overview]
Message-ID: <AANLkTikbSmOQLvP-jab3TnKCbkcXtLWjRXLmvOBm+ihh@mail.gmail.com> (raw)
In-Reply-To: <20100823120503.GH27059@janestreet.com>

On Mon, Aug 23, 2010 at 10:05 PM, Mark Shinwell
<mshinwell@janestreet.com> wrote:
> It can be a time-consuming task, but double-check all the rules on
> http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html are being followed.
> For example, watch out for things like variables of type [value] that are
> wrongly not protected with CAMLlocal/CAMLparam macros across allocation points
> when the variable's contents are needed later, uses of the Field macro as an
> lvalue in a situation where instead Store_field must be used, assigning to
> generational global roots without using the correct function, etc.  Just one
> minor transgression could be the cause of a hard-to-find error at some random
> point during program execution.

OK, I'll do an audit of those calls.

> Have you tried using gdb to determine the stack backtrace when it segfaults?
> Also, if it can be done without disturbing too much code, it might be worth
> trying to eliminate Dynlink from the program as a test.

I've already tried gdb, which is how I learned that the segfault
occurs during a call
to one of the query functions in my glue module.

Oh, we just added the Dynlink stuff.  There haven't been any recent
crashes until
just now.  That could be an unhappy coincidence; the real issue might
lurk in unrelated
code, as you point out.

-- Paul


  reply	other threads:[~2010-08-23 12:13 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-08-23 10:57 Paul Steckler
2010-08-23 11:06 ` [Caml-list] " Stéphane Glondu
2010-08-23 11:47   ` Paul Steckler
2010-08-23 12:05     ` Mark Shinwell
2010-08-23 12:12       ` Paul Steckler [this message]
2010-08-23 12:15         ` Daniel Bünzli
2010-08-23 12:28         ` Anil Madhavapeddy
2010-08-23 15:48         ` Stéphane Glondu
2010-08-25  4:00 ` Paul Steckler
2010-09-03 14:59   ` [Caml-list] " Damien Doligez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=AANLkTikbSmOQLvP-jab3TnKCbkcXtLWjRXLmvOBm+ihh@mail.gmail.com \
    --to=steck@stecksoft.com \
    --cc=caml-list@inria.fr \
    --cc=mshinwell@janestreet.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox