From: Martin Jambon <martin.jambon@ens-lyon.org>
To: "Jørgen Hermanrud Fjeld" <jhf@hex.no>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Segfault with close_out in ocaml 3.09.2
Date: Mon, 2 Jul 2007 15:25:23 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0707021524180.13983@martin.ec.wink.com> (raw)
In-Reply-To: <20070701184116.GA25644@hex.no>
[-- Attachment #1: Type: TEXT/PLAIN, Size: 1280 bytes --]
On Sun, 1 Jul 2007, Jørgen Hermanrud Fjeld wrote:
> Hi!
> I can provoke a segfault with close_out, and suspect a bug somewhere in
> ocaml 3.09.2 or the Pervasives module of ocaml 3.09.2, as shipping with
> Ubuntu feisty.
It's probably this bug:
http://caml.inria.fr/mantis/view.php?id=4039
Martin
>
> To reproduce, save the attached files, use ocaml 3.09.2 and run
> ####
> ocamlopt unix.cmxa -o nosegfault nosegfault.ml
> ocamlopt unix.cmxa -o segfault segfault.ml
> ./nosegfault ; ./segfault
> ####
>
> The difference between segfault.ml and nosegfault.ml is the allocation
> of a large string
> ####
> let _ = String.create (Sys.max_string_length) in
> ####
>
> The bug appears for the second call to close_out.
>
> When I use Unix.close, there is no problem.
>
> The original code where the testcase is derived form ran fine when
> compiled with ocaml 3.08.
>
> When I use ocaml 3.10.0 the problem is gone.
>
> If someone can help discover why the segfault appears that would be
> nice.
> Since the bug disappears in ocaml 3.10, the bug is probably fixed,
> which one can check when the cause of the segfault is discovered.
>
>
> --
> Sincerely | Homepage:
> Jørgen | http://www.hex.no/jhf
> | Public GPG key:
> | http://www.hex.no/jhf/key.txt
>
>
>
prev parent reply other threads:[~2007-07-02 13:25 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-01 18:41 Jørgen Hermanrud Fjeld
2007-07-02 13:25 ` Martin Jambon [this message]
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=Pine.LNX.4.64.0707021524180.13983@martin.ec.wink.com \
--to=martin.jambon@ens-lyon.org \
--cc=caml-list@inria.fr \
--cc=jhf@hex.no \
/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