caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Garry Belka <garry@NetworkPhysics.COM>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Segfault using malloc within stubs
Date: Thu, 24 Feb 2005 16:36:27 -0800	[thread overview]
Message-ID: <421E730B.7000501@networkphysics.com> (raw)

In our case the problem was in an interaction of interface definition 
and run-time system, so to say.

The memory we were allocating within stub was described as an Ocaml 
string, and so Ocaml was trying to check its size at first access, and 
failing with segfault.
As soon as we defined access functions for the string based on 
unsafe_get instead of naively using x.(i) notation, we stopped seeing
Segfault. Other option it to compile code with -unsafe turned on.

Garry


             reply	other threads:[~2005-02-25  0:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-25  0:36 Garry Belka [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-02-06 14:05 julius
2005-02-08 17:51 ` Damien Doligez
2005-02-08 18:42 ` art yerkes

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=421E730B.7000501@networkphysics.com \
    --to=garry@networkphysics.com \
    --cc=caml-list@inria.fr \
    /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;
as well as URLs for NNTP newsgroup(s).