caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamlopt, and generated ASM
@ 2005-07-26 22:41 Jonathan Roewen
  2005-07-27  0:59 ` Stephane Glondu
  0 siblings, 1 reply; 4+ messages in thread
From: Jonathan Roewen @ 2005-07-26 22:41 UTC (permalink / raw)
  To: caml-list

Hi,

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?

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

Jonathan


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt, and generated ASM
  2005-07-26 22:41 [Caml-list] ocamlopt, and generated ASM Jonathan Roewen
@ 2005-07-27  0:59 ` Stephane Glondu
  2005-07-27  1:03   ` Stephane Glondu
  2005-07-27  1:28   ` Jonathan Roewen
  0 siblings, 2 replies; 4+ messages in thread
From: Stephane Glondu @ 2005-07-27  0:59 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list

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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt, and generated ASM
  2005-07-27  0:59 ` Stephane Glondu
@ 2005-07-27  1:03   ` Stephane Glondu
  2005-07-27  1:28   ` Jonathan Roewen
  1 sibling, 0 replies; 4+ messages in thread
From: Stephane Glondu @ 2005-07-27  1:03 UTC (permalink / raw)
  To: Jonathan Roewen; +Cc: caml-list

BTW, I am assuming you are working on i386 architecture.


Stephane Glondu wrote:
> 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.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Caml-list] ocamlopt, and generated ASM
  2005-07-27  0:59 ` Stephane Glondu
  2005-07-27  1:03   ` Stephane Glondu
@ 2005-07-27  1:28   ` Jonathan Roewen
  1 sibling, 0 replies; 4+ messages in thread
From: Jonathan Roewen @ 2005-07-27  1:28 UTC (permalink / raw)
  To: Stephane Glondu; +Cc: caml-list

Nevermind. As always, I find the problem -after- mailing the list ;-)

On 7/27/05, Stephane Glondu <Stephane.Glondu@crans.org> wrote:
> 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.
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-07-27  1:28 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-07-26 22:41 [Caml-list] ocamlopt, and generated ASM Jonathan Roewen
2005-07-27  0:59 ` Stephane Glondu
2005-07-27  1:03   ` Stephane Glondu
2005-07-27  1:28   ` Jonathan Roewen

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).