Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qemu for openSUSE:Factory checked in at 2023-03-24 15:18:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qemu (Old) and /work/SRC/openSUSE:Factory/.qemu.new.31432 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qemu" Fri Mar 24 15:18:21 2023 rev:250 rq:1073761 version:7.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/qemu/qemu.changes 2023-03-19 16:15:49.339101517 +0100 +++ /work/SRC/openSUSE:Factory/.qemu.new.31432/qemu.changes 2023-03-24 15:18:40.442341379 +0100 @@ -1,0 +2,14 @@ +Wed Mar 22 09:29:52 UTC 2023 - Dario Faggioli <dfaggi...@suse.com> + +- Further fixes for bsc#1209546 +* Patches added: + test-vmstate-fix-bad-GTree-usage-use-aft.patch + +------------------------------------------------------------------- +Tue Mar 21 22:02:50 UTC 2023 - Dario Faggioli <dfaggi...@suse.com> + +- Fix bsc#1209546 +* Patches added: + qemu-osdep-Switch-position-of-extern-and.patch + +------------------------------------------------------------------- New: ---- qemu-osdep-Switch-position-of-extern-and.patch test-vmstate-fix-bad-GTree-usage-use-aft.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qemu.spec ++++++ --- /var/tmp/diff_new_pack.dDc8E9/_old 2023-03-24 15:18:44.190360919 +0100 +++ /var/tmp/diff_new_pack.dDc8E9/_new 2023-03-24 15:18:44.194360940 +0100 @@ -245,6 +245,8 @@ Patch00079: acpi-cpuhp-fix-guest-visible-maximum-acc.patch Patch00080: s390x-pci-shrink-DMA-aperture-to-be-boun.patch Patch00081: s390x-pci-reset-ISM-passthrough-devices-.patch +Patch00082: qemu-osdep-Switch-position-of-extern-and.patch +Patch00083: test-vmstate-fix-bad-GTree-usage-use-aft.patch # Patches applied in roms/seabios/: Patch01000: openSUSE-switch-to-python3-as-needed.patch Patch01001: openSUSE-build-enable-cross-compilation-.patch ++++++ bundles.tar.xz ++++++ Binary files old/621da7789083b80d6f1ff1c0fb499334007b4f51.bundle and new/621da7789083b80d6f1ff1c0fb499334007b4f51.bundle differ ++++++ qemu-osdep-Switch-position-of-extern-and.patch ++++++ From: Bernhard Beschow <shen...@gmail.com> Date: Sat, 18 Mar 2023 19:59:31 +0100 Subject: qemu/osdep: Switch position of "extern" and "G_NORETURN" Fixes the Windows build under msys2 using GCC 12 which fails with the following error: [184/579] Compiling C++ object qga/vss-win32/qga-vss.dll.p/install.cpp.obj FAILED: qga/vss-win32/qga-vss.dll.p/install.cpp.obj "c++" "-m64" "-mcx16" "-Iqga/vss-win32/qga-vss.dll.p" "-Iqga/vss-win32" "-I../src/qga/vss-win32" "-I." "-Iqapi" "-Itrace" "-Iui" "-Iui/shader" "-IC:/msys64/mingw64/include/glib-2.0" "-IC:/msys64/mingw64/lib/glib-2.0/include" "-fdiagnostics-color=auto" "-Wall" "-Winvalid-pch" "-Wnon-virtual-dtor" "-Werror" "-std=gnu++11" "-g" "-iquote" "." "-iquote" "C:/msys64/home/shentey/Projects/qemu/src" "-iquote" "C:/msys64/home/shentey/Projects/qemu/src/include" "-iquote" "C:/msys64/home/shentey/Projects/qemu/src/tcg/i386" "-D__STDC_LIMIT_MACROS" "-D__STDC_CONSTANT_MACROS" "-D__STDC_FORMAT_MACROS" "-fno-pie" "-no-pie" "-D_GNU_SOURCE" "-D_FILE_OFFSET_BITS=64" "-D_LARGEFILE_SOURCE" "-fno-strict-aliasing" "-fno-common" "-fwrapv" "-Wundef" "-Wwrite-strings" "-Wtype-limits" "-Wformat-security" "-Wformat-y2k" "-Winit-self" "-Wignored-qualifiers" "-Wempty-body" "-Wendif-labels" "-Wexpansion-to-defined" "-Wimplicit-fallthrough=2" "-Wmissing-format-attribute" "-Wno-missing-include-dirs" "-Wno-shift-neg ative-value" "-Wno-psabi" "-fstack-protector-strong" "-Wno-unknown-pragmas" "-Wno-delete-non-virtual-dtor" "-Wno-non-virtual-dtor" -MD -MQ qga/vss-win32/qga-vss.dll.p/install.cpp.obj -MF "qga/vss-win32/qga-vss.dll.p/install.cpp.obj.d" -o qga/vss-win32/qga-vss.dll.p/install.cpp.obj "-c" ../src/qga/vss-win32/install.cpp In file included from C:/msys64/mingw64/lib/glib-2.0/include/glibconfig.h:9, from C:/msys64/mingw64/include/glib-2.0/glib/gtypes.h:34, from C:/msys64/mingw64/include/glib-2.0/glib/galloca.h:34, from C:/msys64/mingw64/include/glib-2.0/glib.h:32, from C:/msys64/home/shentey/Projects/qemu/src/include/glib-compat.h:32, from C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:144, from ../src/qga/vss-win32/install.cpp:13: C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: error: standard attributes in middle of decl-specifiers 1075 | # define G_NORETURN [[noreturn]] | ^ C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' 240 | extern G_NORETURN | ^~~~~~~~~~ C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: note: standard attributes must precede the decl-specifiers to apply to the declaration, or follow them to apply to the type 1075 | # define G_NORETURN [[noreturn]] | ^ C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' 240 | extern G_NORETURN | ^~~~~~~~~~ C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: error: attribute ignored [-Werror=attributes] 1075 | # define G_NORETURN [[noreturn]] | ^ C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' 240 | extern G_NORETURN | ^~~~~~~~~~ C:/msys64/mingw64/include/glib-2.0/glib/gmacros.h:1075:21: note: an attribute that appertains to a type-specifier is ignored 1075 | # define G_NORETURN [[noreturn]] | ^ C:/msys64/home/shentey/Projects/qemu/src/include/qemu/osdep.h:240:8: note: in expansion of macro 'G_NORETURN' 240 | extern G_NORETURN | ^~~~~~~~~~ cc1plus.exe: all warnings being treated as errors Apparently it also fixes the compilation with Clang 15 (see https://gitlab.com/qemu-project/qemu/-/issues/1541 ). Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1541 Signed-off-by: Bernhard Beschow <shen...@gmail.com> Message-Id: <20230318185931.181659-1-shen...@gmail.com> Reviewed-by: Peter Maydell <peter.mayd...@linaro.org> Signed-off-by: Thomas Huth <th...@redhat.com> (cherry picked from commit 5cb993ff131fca2abef3ce074a20258fd6fce557) Resolves: bsc#1209546 Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- include/qemu/osdep.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h index b1c161c035a0c5a936db1b4b73ea..539c834d997124595238669a54ab 100644 --- a/include/qemu/osdep.h +++ b/include/qemu/osdep.h @@ -177,7 +177,7 @@ extern "C" { * supports QEMU_ERROR, this will be reported at compile time; otherwise * this will be reported at link time due to the missing symbol. */ -extern G_NORETURN +G_NORETURN extern void QEMU_ERROR("code path is reachable") qemu_build_not_reached_always(void); #if defined(__OPTIMIZE__) && !defined(__NO_INLINE__) ++++++ test-vmstate-fix-bad-GTree-usage-use-aft.patch ++++++ From: Eric Auger <eric.au...@redhat.com> Date: Tue, 28 Feb 2023 10:29:44 +0100 Subject: test-vmstate: fix bad GTree usage, use-after-free MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit According to g_tree_foreach() documentation: "The tree may not be modified while iterating over it (you can't add/remove items)." compare_trees()/diff_tree() fail to respect this rule. Historically GLib2 used a slice allocator for the GTree APIs which did not immediately release the memory back to the system allocator. As a result QEMU's use-after-free bug was not visible. With GLib > 2.75.3 however, GLib2 has switched to using malloc and now a SIGSEGV can be observed while running test-vmstate. Get rid of the node removal within the tree traversal. Also check the trees have the same number of nodes before the actual diff. Fixes: 9a85e4b8f6 ("migration: Support gtree migration") Resolves: https://gitlab.com/qemu-project/qemu/-/issues/1518 Signed-off-by: Marc-André Lureau <marcandre.lur...@redhat.com> Signed-off-by: Eric Auger <eric.au...@redhat.com> Reported-by: Richard W.M. Jones <rjo...@redhat.com> Tested-by: Richard W.M. Jones <rjo...@redhat.com> Reviewed-by: Richard W.M. Jones <rjo...@redhat.com> Reviewed-by: Daniel P. Berrangé <berra...@redhat.com> Reviewed-by: Juan Quintela <quint...@redhat.com> Signed-off-by: Juan Quintela <quint...@redhat.com> (cherry picked from commit abe2c4bdb65e8dd9cb2f01c355baa394bf49a8af) Resolves: bsc#1209546 Signed-off-by: Dario Faggioli <dfaggi...@suse.com> --- tests/unit/test-vmstate.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/unit/test-vmstate.c b/tests/unit/test-vmstate.c index 72077b578007227ff2415d5f552e..ff17e80fc88c8e144f1675d259af 100644 --- a/tests/unit/test-vmstate.c +++ b/tests/unit/test-vmstate.c @@ -1075,7 +1075,6 @@ static gboolean diff_tree(gpointer key, gpointer value, gpointer data) struct match_node_data d = {tp->tree2, key, value}; g_tree_foreach(tp->tree2, tp->match_node, &d); - g_tree_remove(tp->tree1, key); return false; } @@ -1084,9 +1083,9 @@ static void compare_trees(GTree *tree1, GTree *tree2, { struct tree_cmp_data tp = {tree1, tree2, function}; + assert(g_tree_nnodes(tree1) == g_tree_nnodes(tree2)); g_tree_foreach(tree1, diff_tree, &tp); - assert(g_tree_nnodes(tree1) == 0); - assert(g_tree_nnodes(tree2) == 0); + g_tree_destroy(g_tree_ref(tree1)); } static void diff_domain(TestGTreeDomain *d1, TestGTreeDomain *d2)