ocaml: Fix locking in event callbacks.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 26 Jul 2011 17:57:19 +0000 (18:57 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Wed, 27 Jul 2011 14:06:34 +0000 (15:06 +0100)
commit019904721b01adf2def2added7ca6b52c55563a8
tree16614d4871203a37b8012b7b48e5e1cd3b5ff605
parenteb06bc486658e43bca82dd05169c09938b8bbe4c
ocaml: Fix locking in event callbacks.

We weren't acquiring the GC lock around some allocations, resulting in
segfaults when an event callback ran at the same time as a main thread
allocation or garbage collection.

In particular this fixes a noticable crash in guestfs-browser.

(Cherry picked from commit 2b8b3f9794ceb43eabd3083e225c669896d8b186).
ocaml/guestfs_c.c