[PATCH] tests: qemublocktest: fix crashing with SIGBUS

Roman Bogorodskiy posted 1 patch 3 years, 8 months ago
Test syntax-check failed
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/libvirt tags/patchew/20200804161000.76167-1-bogorodskiy@gmail.com
tests/qemublocktest.c | 1 -
1 file changed, 1 deletion(-)
[PATCH] tests: qemublocktest: fix crashing with SIGBUS
Posted by Roman Bogorodskiy 3 years, 8 months ago
Commit bcbb026993 converted qemublocktest to use
g_autoptr for virQEMUCaps. To prevent it from crashing,
don't explicitly call virObjectUnref() on this object.

Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
---
 tests/qemublocktest.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c
index fb5319d7bd..0685b703a1 100644
--- a/tests/qemublocktest.c
+++ b/tests/qemublocktest.c
@@ -1394,7 +1394,6 @@ mymain(void)
  cleanup:
     qemuTestDriverFree(&driver);
     VIR_FREE(capslatest_x86_64);
-    virObjectUnref(caps_x86_64);
 
     return ret == 0 ? EXIT_SUCCESS : EXIT_FAILURE;
 }
-- 
2.27.0

Re: [PATCH] tests: qemublocktest: fix crashing with SIGBUS
Posted by Daniel P. Berrangé 3 years, 8 months ago
On Tue, Aug 04, 2020 at 08:10:00PM +0400, Roman Bogorodskiy wrote:
> Commit bcbb026993 converted qemublocktest to use
> g_autoptr for virQEMUCaps. To prevent it from crashing,
> don't explicitly call virObjectUnref() on this object.
> 
> Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
> ---
>  tests/qemublocktest.c | 1 -
>  1 file changed, 1 deletion(-)

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>


Regards,
Daniel
-- 
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|

Re: [PATCH] tests: qemublocktest: fix crashing with SIGBUS
Posted by Ján Tomko 3 years, 8 months ago
On a Tuesday in 2020, Roman Bogorodskiy wrote:
>Commit bcbb026993 converted qemublocktest to use
>g_autoptr for virQEMUCaps. To prevent it from crashing,
>don't explicitly call virObjectUnref() on this object.
>

Oops, thanks for catching that.

>Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com>
>---
> tests/qemublocktest.c | 1 -
> 1 file changed, 1 deletion(-)
>

Reviewed-by: Ján Tomko <jtomko@redhat.com>

Jano