Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: micha <micha-1@fantasymail.de>
To: caml-list@yquem.inria.fr
Subject: segfault in 3.10
Date: Thu, 28 Jun 2007 23:38:30 +0200	[thread overview]
Message-ID: <20070628233830.7d49539d@hmmm.de> (raw)

I get a segfault when compiling the program below with ocamlopt 3.10 on
linux (athlon xp) and running it without an argument (it should throw
an exception). The code below is the smallest part of my program
, without much sense now :-) which produces the segfault; changing
something gives you the normal exception:
  Fatal error: exception Invalid_argument("index out of bounds")

for accessing a non existing array field.

I comiled it with ocamlopt -o seg seg.ml

Is this on my system only or can someone reproduce this?

thanks
 Michael

---------------------------------
open Printf;;
module ISet = Set.Make (struct type t=int let compare = (-) end);;

let gen_hash keys maxlen = (fun i -> 0);;

let test_hash hash keys =
        let set = Queue.fold(fun set k -> ISet.remove 0 set)
(ISet.empty) keys in () ;;

let _ =
        printf "%s keys...\n" Sys.argv.(1);
        let k = Queue.create() in
        let h = gen_hash k 20 in
        print_endline "ready";
        test_hash h k


             reply	other threads:[~2007-06-28 21:38 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-28 21:38 micha [this message]
2007-06-28 22:35 ` [Caml-list] " Olivier Andrieu
2007-06-29  0:22 ` Jon Harrop

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=20070628233830.7d49539d@hmmm.de \
    --to=micha-1@fantasymail.de \
    --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