caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: "Olivier Andrieu" <oandrieu@nerim.net>
To: "Daniel Bünzli" <daniel.buenzli@epfl.ch>
Cc: "Sebastien Ferre" <ferre@irisa.fr>, caml-list@yquem.inria.fr
Subject: Re: [Caml-list] marshaling limits
Date: Wed, 17 Jan 2007 17:32:04 +0100	[thread overview]
Message-ID: <95513600701170832j30a8b0b3h9a0f0a25a8bd4f8c@mail.gmail.com> (raw)
In-Reply-To: <DB0B80A6-F107-47F9-B155-3336050CCBB0@epfl.ch>

On 1/17/07, Daniel Bünzli <daniel.buenzli@epfl.ch> wrote:
>
> Le 17 janv. 07 à 16:41, Sebastien Ferre a écrit :
>
> > pourtant, je passe bien par un appel a output_value
> > dans un fichier, sans passer par une chaine intermediaire.
>
> Maybe output_value uses a string internally. Try with a bytecode
> version of your executable, an exception should be raised (or have a
> look at the implementaiton of output_value).

output_value doesn't use a string internally, it uses malloc. Anyway,
if the marshalling function runs out of memory (wether because malloc
returns NULL or because the caml string is too large), an
Out_of_memory exception is raised.

If it segfaults, that's most probably because the marshalling runs out
of executable stack (because of too much recursion). I've seen it do
this before. The "fix" is to increase the maximum size of the
executable stack.

The behavior is the same with bytecode or native code since it's not
the interpreter's stack that overflows, it's the C one.


  reply	other threads:[~2007-01-17 16:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-16 20:48 ocaml+twt v0.90 Mike Lin
2007-01-17  9:14 ` marshaling limits Sebastien Ferre
2007-01-17  9:36   ` [Caml-list] " Olivier Andrieu
2007-01-17 15:33   ` Frédéric Gava
2007-01-17 15:41     ` Sebastien Ferre
2007-01-17 16:12       ` Daniel Bünzli
2007-01-17 16:32         ` Olivier Andrieu [this message]
2007-01-18  8:14           ` Sebastien Ferre
2007-01-17 16:34         ` Sebastien Ferre
2007-01-17 19:37           ` Jonathan Roewen
2007-01-17 19:50           ` Yaron Minsky
2007-01-17 22:51             ` Markus Mottl
2007-01-23 20:43 ` [Caml-list] ocaml+twt v0.90 Ingo Bormuth
     [not found]   ` <2a1a1a0c0701231322h48e3af00m9f07371f236fe7c@mail.gmail.com>
2007-01-24 16:09     ` Ingo Bormuth

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=95513600701170832j30a8b0b3h9a0f0a25a8bd4f8c@mail.gmail.com \
    --to=oandrieu@nerim.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=daniel.buenzli@epfl.ch \
    --cc=ferre@irisa.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).