summaryrefslogtreecommitdiffstats
path: root/python/run-python-tests
diff options
context:
space:
mode:
authorRichard Jones <rjones@redhat.com>2010-06-16 15:25:45 +0100
committerRichard Jones <rjones@redhat.com>2010-07-12 08:38:21 +0100
commit011a75749213a347443ad3e5ee5fc04481f8433a (patch)
tree774fab800bea9e2eadea362b98f767af54831b7f /python/run-python-tests
parent1d28631e7c9c41a17b04b6250395ff131a1f05ea (diff)
downloadlibguestfs-011a75749213a347443ad3e5ee5fc04481f8433a.tar.gz
libguestfs-011a75749213a347443ad3e5ee5fc04481f8433a.tar.xz
libguestfs-011a75749213a347443ad3e5ee5fc04481f8433a.zip
ocaml: Fix thread safety of strings in bindings (RHBZ#604691).
There's a thread safety issue with the current OCaml bindings which is well explained in the bug report: https://bugzilla.redhat.com/show_bug.cgi?id=604691 This commit fixes the safety issue by copying strings temporarily before releasing the thread lock. Updated code looks like this: char *filename = guestfs_safe_strdup (g, String_val (filenamev)); int r; caml_enter_blocking_section (); r = guestfs_add_drive_ro (g, filename); caml_leave_blocking_section (); free (filename); if (r == -1) ocaml_guestfs_raise_error (g, "add_drive_ro"); Also included is a regression test. For stable-1.2 branch: - cherry picked from commit 1079f74704a06c06996e547fdecf20a8f92799c6 - generator code rebased
Diffstat (limited to 'python/run-python-tests')
0 files changed, 0 insertions, 0 deletions