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:00:15 +0000 (15:00 +0100)
commit9729402e7524964f216c6232ebc4e2e3eaa03886
tree5838b185794b2f08017fc8e79bed51ac288c7ac1
parent705f1a74f57f88315acc31aeab58e4a9d0f57cff
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