Crash when including C code into mirageos



I have problem described in
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)

Called as in

let bb = (read_int aa; 33) in

Any hint what is the cause?


Building same code in ubuntu 14.04 - it works on Xen too. The VM image compiled on ubuntu 16.04 - crash.