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>
Tue, 26 Jul 2011 17:58:27 +0000 (18:58 +0100)
commit2b8b3f9794ceb43eabd3083e225c669896d8b186
tree70433bebb4b4162c1c818f1f5596482aa65db2c0
parentb5bdd0f8004af4c6c74a05031cb340b98ae03088
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.
ocaml/guestfs_c.c