caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stefano Zacchiroli <zack@bononia.it>
To: caml-list@inria.fr
Subject: Re: [Caml-list] Segmentation Fault on #load
Date: Tue, 28 Oct 2003 17:11:55 +0100	[thread overview]
Message-ID: <20031028161155.GA4081@fistandantilus.takhisis.org> (raw)
In-Reply-To: <ADD42C8394EBD4118A3D0003470C18F00950F41F@G9JJT.mgb01.telekom.de>

On Tue, Oct 28, 2003 at 04:47:04PM +0100, Beck01, Wolfgang wrote:
> > # #load pretty.cmo;;
> > Segmentation fault (core dumped)
> 
> Loading object files into the ocaml toplevel is not a good idea.
> It's like loading pretty.cmo in your text editor (which looks
> not pretty).
> 
> If you have the source code of pretty.cmo, load it (#load "pretty.mL").

You're confusing two toplevel directive: #use and #load.  The first one
is the one you should use in your example: #use "pretty.ml" and
interpret a source file in the same way as it would have been
interpreted while typing it.  The second one, correctly used in the
first post asking for help, loads a bytecode object in the toplevel
using ocaml dynamic loading.

Regarding the reason of segfaults, it can be caused by many factors ...

First of all: do you get the same segfault linking your code in an
executable and executing it? If the behaviour is the same then it can be
one of the usual three reasons that cause an ocaml program to segfault:
use of external segfaulting C code, incorrect use of an Obj.magic, a
bug.

I think you need to give us more information to get an appreciable help
...

Cheers.

-- 
Stefano Zacchiroli  --  Master in Computer Science @ Uni. Bologna, Italy
zack@{cs.unibo.it,debian.org,bononia.it}  -  http://www.bononia.it/zack/
"  I know you believe you understood what you think I said, but I am not
sure you realize that what you heard is not what I meant!  " -- G.Romney

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  parent reply	other threads:[~2003-10-28 16:11 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-28 15:47 Beck01, Wolfgang
2003-10-28  9:05 ` David Brown
2003-10-28 19:37   ` Oleg Trott
2003-10-28 16:11 ` Stefano Zacchiroli [this message]
  -- strict thread matches above, loose matches on Subject: below --
2003-10-29  8:20 Beck01, Wolfgang
2003-10-28 19:56 Kevin S. Millikin
2003-10-28 21:37 ` Eric Dahlman
2003-10-27 19:23 Eric Dahlman

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=20031028161155.GA4081@fistandantilus.takhisis.org \
    --to=zack@bononia.it \
    --cc=caml-list@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).