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

Re: [Xen-devel] [PATCH v3-RESEND 12/28] libxl: ocaml: make Val_defbool GC-proof

On Mon, 2013-10-21 at 14:32 +0100, Rob Hoes wrote:
> The Val_* functions potentially allocate new values on the OCaml heap, and may
> trigger an iteration of the OCaml GC.  Therefore, it is important to assign
> values produced by Val_* immediately to variables declared with CAMLlocal
> macros, which register the values with the GC.

Bonkers stuff ;-)

> This leads to slightly weird looking C code, but avoids hard to find 
> segfaults.
> Signed-off-by: Rob Hoes <rob.hoes@xxxxxxxxxx>

Acked-by: Ian Campbell <ian.campbell@xxxxxxxxxx>

Xen-devel mailing list



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