Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: Dmitry Bely <dmitry.bely@gmail.com>
To: Romain Beauxis <toots@rastageeks.org>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Bigarrays and blocking_section..
Date: Tue, 25 May 2010 23:29:28 +0400	[thread overview]
Message-ID: <AANLkTik8RlicxkdiITwEg8nejkx0X4yYl-bkXNq3TCFI@mail.gmail.com> (raw)
In-Reply-To: <201005251125.21755.toots@rastageeks.org>

On Tue, May 25, 2010 at 8:25 PM, Romain Beauxis <toots@rastageeks.org> wrote:
>        Hi all !
>
> I am trying to understand some segfault that we observe and I have a question
> about the relationships between bigarrays in C and the Gc.
>
> We have the following code:
>
> static frame *frame_of_value(value v, frame *f)
> {
>  f->data = Caml_ba_data_val(Field(v,0));
>  f->width = Int_val(Field(v,1));
>  f->height = Int_val(Field(v,2));
>  f->stride = Int_val(Field(v,3));
>
>  return f;
> }

Are you sure that you correctly calculate the bigarray size in your
Caml code? Why not just use struct caml_ba_array fields? I suspect
it's not GC problem but just a buffer overrun in memset().

- Dmitry Bely


  reply	other threads:[~2010-05-25 19:29 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-25 16:25 Romain Beauxis
2010-05-25 19:29 ` Dmitry Bely [this message]
2010-05-25 20:11   ` [Caml-list] " Romain Beauxis
2010-05-26  1:16     ` Goswin von Brederlow
2010-05-26  6:00 ` Alain Frisch
2010-05-26  6:47   ` Goswin von Brederlow

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=AANLkTik8RlicxkdiITwEg8nejkx0X4yYl-bkXNq3TCFI@mail.gmail.com \
    --to=dmitry.bely@gmail.com \
    --cc=caml-list@yquem.inria.fr \
    --cc=toots@rastageeks.org \
    /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