qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] valgrind errors (was: [PATCH 7/8] qemu/queue.h: simplif


From: Paolo Bonzini
Subject: Re: [Qemu-devel] valgrind errors (was: [PATCH 7/8] qemu/queue.h: simplify reverse access to QTAILQ)
Date: Mon, 4 Feb 2019 16:35:31 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.3.1

On 04/02/19 12:45, Thomas Huth wrote:
> when running current QEMU master branch with valgrind, I get
> "Conditional jump or move depends on uninitialised value" errors. I've
> bisected it to your patch series here. Everything is still fine and calm
> with f481ee2d5e3d77c12a4c9a7756b8c2612aad84c6 ("qemu/queue.h: typedef
> QTAILQ heads"), but starting with commit
> eae3eb3e185028d6e862db747e3b7397600d6762 ("qemu/queue.h: simplify
> reverse access to QTAILQ"), I now get:

After fixing compilation with

diff --git a/memory.c b/memory.c
index 195c5cf..73b5ec6 100644
--- a/memory.c
+++ b/memory.c
@@ -128,7 +128,7 @@ enum ListenerDirection { Forward, Reverse };
 #define MEMORY_LISTENER_CALL(_as, _callback, _direction, _section,
_args...) \
     do {                                                                \
         MemoryListener *_listener;                                      \
-        struct memory_listeners_as *list = &(_as)->listeners;           \
+        union memory_listeners_as *list = &(_as)->listeners;           \
                                                                         \
         switch (_direction) {                                           \
         case Forward:                                                   \

I bisected it (not unexpectedly) to
7274f01bb8b81ffe8f13f463b6b0f3b9246c5387.  It's a stupid stupid bug, and
I'm sending a patch soon.

Paolo



reply via email to

[Prev in Thread] Current Thread [Next in Thread]