caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Stephane Glondu <Stephane.Glondu@crans.org>
To: Jonathan Roewen <jonathan.roewen@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlopt, and generated ASM
Date: Tue, 26 Jul 2005 17:59:26 -0700	[thread overview]
Message-ID: <42E6DC6E.60109@crans.org> (raw)
In-Reply-To: <ad8cfe7e0507261541385f126@mail.gmail.com>

Jonathan Roewen wrote:
> I'm having some esoteric problems with my operating system project,
> and it randomly halting (i.e.: the hlt instruction issued with
> interrupts off). I've tried grepping the ocaml sources, but to no
> avail.
> 
> Could someone who has some in-depth knowledge of the code gneretor for
> ocamlopt explain where these hlt instructions come from, and more
> importantly, where abouts they are generated?

Where are these hlt exactly? In the asm file generated from the .ml
file? In the startup code? In the runtime library? The string "hlt"
doesn't seem to appear in ocaml (at least in version 3.08.3) source
code, so it seems very weird (even though possible) that this
instruction is generated by the compiler... Moreover, you usually need
to be in privilege level 0 (in kernel mode) to execute that
instruction, and there are not many ocamlopt-generated programmes run
in kernel mode... Maybe it is at a place which is not expected to be
reached in "normal" programme execution (such as after a call to
exit()). Are you sure this hlt comes from the ocamlopt generated code?

> Perhaps ocaml 3.08.2 has some interesting bugs I'm not aware of?

Actually, I'm working with version 3.08.3. But still, I would be
interested if you found out the problem.


-- 

Stephane Glondu.


  reply	other threads:[~2005-07-27  1:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-26 22:41 Jonathan Roewen
2005-07-27  0:59 ` Stephane Glondu [this message]
2005-07-27  1:03   ` Stephane Glondu
2005-07-27  1:28   ` Jonathan Roewen

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=42E6DC6E.60109@crans.org \
    --to=stephane.glondu@crans.org \
    --cc=caml-list@yquem.inria.fr \
    --cc=jonathan.roewen@gmail.com \
    /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).