All of lore.kernel.org
 help / color / mirror / Atom feed
* caml stubdom crashes
@ 2009-04-02 14:38 Alex Zeffertt
  2009-04-02 16:22 ` Patrick Colp
  0 siblings, 1 reply; 23+ messages in thread
From: Alex Zeffertt @ 2009-04-02 14:38 UTC (permalink / raw)
  To: xen-devel@lists.xensource.com

Hello ocaml minios stubdomain experts (that's narrowed down the list somewhat!)

I've been playing with the caml version of the "hello world" example stubdomain 
that can be found in xen-unstable.hg/stubdom/caml/.

If I make the following trivial modification to stubdom/caml/hello.ml the stub 
domain page faults.  According to addr2line the page fault is in ungetc.c:0.

--- a/stubdom/caml/hello.ml	Mon Mar 30 11:42:16 2009 +0100
+++ b/stubdom/caml/hello.ml	Thu Apr 02 15:15:45 2009 +0100
@@ -1,4 +1,6 @@
+let yr = 2009
+
  let main arg =
-  Printf.printf "Hello, world!\n%!."
+  Printf.printf "Hello, world %d!\n%!." yr

  let _ = Callback.register "main" main


Without the above change the stub domain runs as expected, i.e. it does not page 
fault.

I suspect the problem is that the caml-stubdom target in stubdom/caml/Makefile 
compiles stubdom/caml/hello.ml and links it with $(CAMLLIB)/libasmrun.a.  But 
this is a library compiled for the development machine platform 
(linux-i386-glibc) not for the stubdomain platform (minios-i386-newlib).

Maybe the original hello.ml only worked through luck, and the fact that it used 
so very little of the ocaml language.

In order to run a non trivial ocaml application in a stubdomain (e.g. ocaml 
xenstored) do I need to port ocaml to minios-i386-newlib?

If so, I would really appreciate any pointers(*) on how to go about this as I am 
  an ocaml newbie.

Regards,

Alex

(*) Although I understand you don't get pointers in ocaml.  They would make it 
too easy to do what you want to do, which is probably the wrong thing.  :)

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

end of thread, other threads:[~2009-04-06 16:44 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-02 14:38 caml stubdom crashes Alex Zeffertt
2009-04-02 16:22 ` Patrick Colp
2009-04-02 17:19   ` George S. Coker, II
2009-04-02 19:39     ` ocaml?? why?? (was: caml stubdom crashes) Dan Magenheimer
2009-04-02 21:38       ` Samuel Thibault
2009-04-02 22:13         ` Dan Magenheimer
2009-04-02 22:31           ` Samuel Thibault
2009-04-02 23:36           ` Ian Pratt
2009-04-03  0:40             ` Dan Magenheimer
2009-04-03  1:21               ` Ian Pratt
2009-04-02 23:46           ` Anil Madhavapeddy
2009-04-06 10:33       ` John Levon
2009-04-06 13:51         ` ocaml?? why?? Vincent Hanquez
2009-04-06 13:51           ` John Levon
2009-04-06 15:08             ` Vincent Hanquez
2009-04-06 15:29               ` Patrick Colp
2009-04-06 15:38               ` John Levon
2009-04-06 16:44                 ` Vincent Hanquez
2009-04-03  8:53     ` caml stubdom crashes Alex Zeffertt
2009-04-03 14:53       ` George S. Coker, II
2009-04-03 21:07         ` Patrick Colp
2009-04-06 13:42           ` Alex Zeffertt
2009-04-03  8:31   ` Alex Zeffertt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.