[Pkg-libvirt-commits] [SCM] Libguestfs Debian packaging branch, experimental, updated. debian/1%1.21.40-1
Richard W.M. Jones
rjones at redhat.com
Sat Jun 1 11:04:18 UTC 2013
The following commit has been merged in the experimental branch:
commit 0d989d52a615b86aa65477c7719e9c7e49b18873
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Thu Apr 25 20:10:26 2013 +0100
ruby: Fix segfault in regression test.
This was revealed by the regression test for RHBZ#664558.
Unfortunately because Ruby tests had been silently disabled,
this regression test was never run.
diff --git a/generator/ruby.ml b/generator/ruby.ml
index adf1d11..d6ca430 100644
--- a/generator/ruby.ml
+++ b/generator/ruby.ml
@@ -191,8 +191,11 @@ ruby_guestfs_close (VALUE gv)
guestfs_h *g;
Data_Get_Struct (gv, guestfs_h, g);
- ruby_guestfs_free (g);
+ /* Clear the data pointer first so there's no chance of a double
+ * close if a close callback does something bad like calling exit.
+ */
DATA_PTR (gv) = NULL;
+ ruby_guestfs_free (g);
return Qnil;
}
@@ -361,11 +364,12 @@ ruby_event_callback_wrapper_wrapper (VALUE argvv)
static VALUE
ruby_event_callback_handle_exception (VALUE not_used, VALUE exn)
{
- /* Callbacks aren't supposed to throw exceptions. The best we
- * can do is to print the error.
+ /* Callbacks aren't supposed to throw exceptions. */
+ fprintf (stderr, \"libguestfs: exception in callback!\\n\");
+
+ /* XXX We could print the exception, but it's very difficult from
+ * a Ruby extension.
*/
- fprintf (stderr, \"libguestfs: exception in callback: %%s\\n\",
- StringValueCStr (exn));
return Qnil;
}
--
Libguestfs Debian packaging
More information about the Pkg-libvirt-commits
mailing list