[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[MirageOS-devel] Trivial C code crashes at Int_val() function



Hi

I have problem described in
https://github.com/mirage/mirage-skeleton/issues/2511.
Addition of trivial C code work when compiling mirageOS for unix platform, but crashes when compiled and run as Xen VM. Example C code:

void read_int_real(int aa) {
 asm(""); // will prevent optimization (e.g. removing whole function)?
 aa = aa*2;
}

CAMLprim value read_int(value aa)
{
 CAMLparam1(aa);
 read_int_real(Int_val(aa));
 CAMLreturn(Val_unit);
}


Called as in

external read_int : int -> unit = "read_int"
let
bb = (read_int aa; 33) in ...


Any hint what is the cause?
Complete example is at https://github.com/justinc1/mirage-skeleton/tree/jc-crash-issue-251, commit 1da971caae5295d47588b6dc9637e68e2b0c7f89.

Also, if someone can point me at how to direct "mirage configure -t xen, make depends" to include additional C files.


BR and thank you

Justin




_______________________________________________
MirageOS-devel mailing list
MirageOS-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/mirageos-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.