caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Sean Seefried <sean.seefried@nicta.com.au>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Heaps size problems with "caml_alloc_small" in foreign function interfaces
Date: Sat, 12 Jul 2008 16:09:03 +1000	[thread overview]
Message-ID: <D057C28E-E842-4C67-96B7-9857260EDD0A@nicta.com.au> (raw)
In-Reply-To: <97BDCFD7-C714-440D-A04E-2C141E4AD3E0@nicta.com.au>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

Hi Xavier,

Okay, here's some further clarification and this time I'm attaching a  
file. I've had to GZip it because it's so big.

The bug in question occurs on line 4078.

I should clarify. This file becomes part of a library that is linked  
into another OCaml program.  On one input file that this OCaml program  
takes as input it fails on line 4078.  On other files it fails on  
other lines. However, the code it fails at always seems to be of the  
form:

     _v2 = camlidl_alloc_small(18, 0);
     { mlsize_t _c8;
       for (_c8 = 0; _c8 < 18; _c8++) Field(_v2, _c8) = _v3[_c8];
     }

What's strange about this is that this is automatically generated code  
from CamlIDL (with a few extra debugging messages I threw in). Xavier,  
I'm using CamlDL to write a binding to a  C front-end which has an  
absolutely huge C data structure.  I've had to write several  
extensions to CamlIDL to make this a reality, but for the moment I'm  
keeping these in my own source control mainly because your coding  
style is very clean and many of my extensions could have been done a  
lot more elegantly.

However, the code that is being generated above was already generated  
by version 1.05 of CamlIDL.


The file can be found at: http://howe.textdrive.com/~sseefried/files/test.c.gz

Sean


[-- Attachment #2: Type: text/html, Size: 3388 bytes --]

  reply	other threads:[~2008-07-12  6:09 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-12  6:07 Sean Seefried
2008-07-12  6:09 ` Sean Seefried [this message]
2008-07-12  8:50 ` Richard Jones
2008-07-13 13:25   ` Sean Seefried
2008-07-13 13:37     ` Gordon Henriksen
2008-07-13 14:03     ` Thomas Crimi
  -- strict thread matches above, loose matches on Subject: below --
2008-07-11  8:21 Sean Seefried
2008-07-11  9:40 ` [Caml-list] " Richard Jones
2008-07-11  9:51   ` Richard Jones
2008-07-11 10:21   ` Sean Seefried
2008-07-11 15:56     ` Richard Jones
2008-07-11 14:11 ` Xavier Leroy
2008-07-12  3:20   ` Sean Seefried
2008-07-12  6:00   ` Sean Seefried

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=D057C28E-E842-4C67-96B7-9857260EDD0A@nicta.com.au \
    --to=sean.seefried@nicta.com.au \
    --cc=Xavier.Leroy@inria.fr \
    --cc=caml-list@yquem.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).