Skip to content
Snippets Groups Projects
user avatar
Christian Borntraeger authored
valgrind with kvm produces a big amount of false positives regarding
"Conditional jump or move depends on uninitialised value(s)". This
happens because the guest memory is allocated with qemu_vmalloc which
boils down posix_memalign etc. This function is (correctly) considered
by valgrind as returning undefined memory.

Since valgrind is based on jitting code, it will not be able to see
changes made by the guest to guest memory if this is done by KVM_RUN,
thus keeping most of the guest memory undefined.

Now lots of places in qemu will then use guest memory to change behaviour.
To avoid the flood of these messages, lets declare the whole guest
memory as defined. This will reduce the noise and allows us to see real
problems.

In the future we might want to make this conditional, since there
is actually something that we can use those false positives for:
These messages will point to code that depends on guest memory, so
we can use these backtraces to actually make an audit that is focussed
only at those code places. For normal development we dont want to
see those messages, though.

Signed-off-by: default avatarChristian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: default avatarAvi Kivity <avi@redhat.com>
62fe8331
History
Name Last commit Last update
QMP
audio
block
bsd-user
default-configs
docs
fpu
fsdev
gdb-xml
hw
include/qemu
libcacard
linux-headers
linux-user
net
pc-bios
qapi
qga
qom
roms
scripts
slirp
sysconfigs/target
target-alpha
target-arm
target-cris
target-i386
target-lm32
target-m68k
target-microblaze
target-mips
target-openrisc
target-ppc
target-s390x
target-sh4
target-sparc
target-unicore32
target-xtensa
tcg
tests
trace
ui
.gitignore
.gitmodules
.mailmap
CODING_STYLE
COPYING
COPYING.LIB
Changelog
HACKING
LICENSE
MAINTAINERS
Makefile
Makefile.dis
Makefile.hw
Makefile.objs
Makefile.target
Makefile.user
README
TODO
VERSION
a.out.h
acl.c
acl.h
aes.c
aes.h
aio.c
alpha-dis.c
alpha.ld
arch_init.c
arch_init.h
arm-dis.c
arm.ld
async.c
balloon.c
balloon.h
bitmap.c
bitmap.h
bitops.c
bitops.h
block-migration.c
block-migration.h
block.c
block.h
block_int.h
blockdev.c
blockdev.h
bswap.h
bt-host.c
bt-host.h
bt-vhci.c
buffered_file.c
buffered_file.h
cache-utils.c
cache-utils.h
cmd.c
cmd.h
compatfd.c
compatfd.h
compiler.h
config.h
configure
console.c
console.h
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
cpu-all.h
cpu-common.h
cpu-defs.h
cpu-exec.c
cpus.c
cpus.h
cputlb.c
cputlb.h
cris-dis.c
cursor.c
cursor_hidden.xpm
cursor_left_ptr.xpm
cutils.c
def-helper.h
device_tree.c
device_tree.h
dis-asm.h
disas.c
disas.h
dma-helpers.c
dma.h
dump-stub.c
dump.c
dump.h
dyngen-exec.h
elf.h
envlist.c
envlist.h
error.c
error.h
event_notifier.c
event_notifier.h
exec-all.h
exec-memory.h
exec-obsolete.h
exec.c
gdbstub.c
gdbstub.h
gen-icount.h
hmp-commands.hx
hmp.c
hmp.h
host-utils.c
host-utils.h
hppa-dis.c
hppa.ld
i386-dis.c
i386.ld
ia64-dis.c
ia64.ld
input.c
int128.h
iohandler.c
ioport.c
ioport.h
iorange.h
iov.c
iov.h
json-lexer.c
json-lexer.h
json-parser.c
json-parser.h
json-streamer.c
json-streamer.h
kvm-all.c
kvm-stub.c
kvm.h
libfdt_env.h
linux-aio.c
lm32-dis.c
m68k-dis.c
m68k.ld
main-loop.c
main-loop.h
memory.c
memory.h
memory_mapping-stub.c
memory_mapping.c
memory_mapping.h
microblaze-dis.c
migration-exec.c
migration-fd.c
migration-tcp.c
migration-unix.c
migration.c
migration.h
mips-dis.c
mips.ld
module.c
module.h
monitor.c
monitor.h
Read the documentation in qemu-doc.html or on http://wiki.qemu.org

- QEMU team