From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id CB79BD179 for ; Wed, 27 Jul 2005 03:04:32 +0200 (CEST) Received: from mx1.ucdavis.edu (mx1.ucdavis.edu [169.237.104.11]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id j6R14UKT014225 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Wed, 27 Jul 2005 03:04:32 +0200 Received: from [169.237.7.95] (puck.cs.ucdavis.edu [169.237.7.95]) by mx1.ucdavis.edu (8.13.3/8.13.1/it-defang-5.4.0) with ESMTP id j6R14Qsb014083; Tue, 26 Jul 2005 18:04:26 -0700 (PDT) Message-ID: <42E6DD4D.2050101@crans.org> Date: Tue, 26 Jul 2005 18:03:09 -0700 From: Stephane Glondu User-Agent: Debian Thunderbird 1.0.2 (X11/20050331) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jonathan Roewen Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlopt, and generated ASM References: <42E6DC6E.60109@crans.org> In-Reply-To: <42E6DC6E.60109@crans.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Scanned-By: MIMEDefang 2.49 on 169.237.104.11 X-Miltered: at concorde with ID 42E6DD9E.001 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocamlopt:01 grepping:01 ocaml:01 ocamlopt:01 runtime:01 ocaml:01 compiler:01 hlt:98 interrupts:98 hlt:98 ...:98 ...:98 wrote:01 wrote:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 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.