[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 490360: vl: Don't mismatch g_strsplit()/g_fre
From: |
Peter Maydell |
Subject: |
[Qemu-commits] [qemu/qemu] 490360: vl: Don't mismatch g_strsplit()/g_free() |
Date: |
Thu, 13 Feb 2020 06:45:13 -0800 |
Branch: refs/heads/master
Home: https://github.com/qemu/qemu
Commit: 4903602eae82787b1ade04efd9bb5949c04571d6
https://github.com/qemu/qemu/commit/4903602eae82787b1ade04efd9bb5949c04571d6
Author: Pan Nengyuan <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M vl.c
Log Message:
-----------
vl: Don't mismatch g_strsplit()/g_free()
It's a mismatch between g_strsplit and g_free, it will cause a memory leak as
follow:
[root@localhost]# ./aarch64-softmmu/qemu-system-aarch64 -accel help
Accelerators supported in QEMU binary:
tcg
kvm
=================================================================
==1207900==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 8 byte(s) in 2 object(s) allocated from:
#0 0xfffd700231cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
#1 0xfffd6ec57163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
#2 0xfffd6ec724d7 in g_strndup (/lib64/libglib-2.0.so.0+0x724d7)
#3 0xfffd6ec73d3f in g_strsplit (/lib64/libglib-2.0.so.0+0x73d3f)
#4 0xaaab66be5077 in main /mnt/sdc/qemu-master/qemu-4.2.0-rc0/vl.c:3517
#5 0xfffd6e140b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f)
#6 0xaaab66bf0f53 (./build/aarch64-softmmu/qemu-system-aarch64+0x8a0f53)
Direct leak of 2 byte(s) in 2 object(s) allocated from:
#0 0xfffd700231cb in __interceptor_malloc (/lib64/libasan.so.4+0xd31cb)
#1 0xfffd6ec57163 in g_malloc (/lib64/libglib-2.0.so.0+0x57163)
#2 0xfffd6ec7243b in g_strdup (/lib64/libglib-2.0.so.0+0x7243b)
#3 0xfffd6ec73e6f in g_strsplit (/lib64/libglib-2.0.so.0+0x73e6f)
#4 0xaaab66be5077 in main /mnt/sdc/qemu-master/qemu-4.2.0-rc0/vl.c:3517
#5 0xfffd6e140b9f in __libc_start_main (/lib64/libc.so.6+0x20b9f)
#6 0xaaab66bf0f53 (./build/aarch64-softmmu/qemu-system-aarch64+0x8a0f53)
Reported-by: Euler Robot <address@hidden>
Signed-off-by: Pan Nengyuan <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: e261b36810de8dfd825b6b01fff43a6bd6f2bd8d
https://github.com/qemu/qemu/commit/e261b36810de8dfd825b6b01fff43a6bd6f2bd8d
Author: Luc Michel <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M include/qemu/seqlock.h
Log Message:
-----------
seqlock: fix seqlock_write_unlock_impl function
The seqlock write unlock function was incorrectly calling
seqlock_write_begin() instead of seqlock_write_end(), and was releasing
the lock before incrementing the sequence. This could lead to a race
condition and a corrupted sequence number becoming odd even though the
lock is not held.
Signed-off-by: Luc Michel <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-Id: <address@hidden>
Fixes: 988fcafc73 ("seqlock: add QemuLockable support", 2018-08-23)
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: a284f798f356ccb9e2c5c6dcae08c92da3b22114
https://github.com/qemu/qemu/commit/a284f798f356ccb9e2c5c6dcae08c92da3b22114
Author: Peter Maydell <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M include/qemu/timer.h
M util/qemu-timer-common.c
Log Message:
-----------
Remove support for CLOCK_MONOTONIC not being defined
Some older parts of QEMU's codebase assume that CLOCK_MONOTONIC
might not be defined by the host OS, and have workarounds to
deal with this. However, more recently (notably in commit
50290c002c045280f8d for qemu-img in mid-2019, but also much
earlier in 2011 in commit 22795174a37e0 for ui/spice-display.c)
we've written code that assumes CLOCK_MONOTONIC is always
defined. The only host OS anybody's ever noticed this on
is OSX 10.11 and earlier, which we don't support.
So we can assume that all our host OSes have the #define,
and we can remove some now-unnecessary ifdefs.
Signed-off-by: Peter Maydell <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: 1b29af2f41227aaa45f6331a993fe4afe45d53c2
https://github.com/qemu/qemu/commit/1b29af2f41227aaa45f6331a993fe4afe45d53c2
Author: Marc-André Lureau <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M scripts/minikconf.py
Log Message:
-----------
minikconf: accept alnum identifiers
Signed-off-by: Marc-André Lureau <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: fe3dada3172310c7d3db666b4223d89e6c6f7fa3
https://github.com/qemu/qemu/commit/fe3dada3172310c7d3db666b4223d89e6c6f7fa3
Author: Paolo Bonzini <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M exec.c
Log Message:
-----------
exec: do not define use_icount for user-mode emulation
use_icount is also defined by stubs/cpu-get-icount.c, we do not need
to have a useless definition in exec.c.
Signed-off-by: Paolo Bonzini <address@hidden>
Message-id: <address@hidden>
Reviewed-by: Alex Bennée <address@hidden>
Commit: 4cc600d22906a839719116043dbc3760e02c756e
https://github.com/qemu/qemu/commit/4cc600d22906a839719116043dbc3760e02c756e
Author: Paolo Bonzini <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M bsd-user/syscall.c
M configure
M linux-user/exit.c
M linux-user/signal.c
M tests/check-block.sh
Log Message:
-----------
build: move TARGET_GPROF to config-host.mak
TARGET_GPROF is the same for all targets, write it to
config-host.mak instead.
Reviewed-by: Alex Bennée <address@hidden>
Reviewed-by: Marc-André Lureau <address@hidden>
Reviewed-by: Philippe Mathieu-Daudé <address@hidden>
Message-id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: 9028c75c9d08be303ccc425bfe3d3b23d8f4cac7
https://github.com/qemu/qemu/commit/9028c75c9d08be303ccc425bfe3d3b23d8f4cac7
Author: Paolo Bonzini <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M target/i386/misc_helper.c
Log Message:
-----------
target/i386: fix TCG UCODE_REV access
This was a very interesting semantic conflict that caused git to move
the MSR_IA32_UCODE_REV read to helper_wrmsr. Not a big deal, but
still should be fixed...
Fixes: 4e45aff398 ("target/i386: add a ucode-rev property", 2020-01-24)
Message-id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: 6702514814c7e7b4cbf179624539b5f38c72740b
https://github.com/qemu/qemu/commit/6702514814c7e7b4cbf179624539b5f38c72740b
Author: Paolo Bonzini <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M target/i386/kvm.c
Log Message:
-----------
target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR
Even though MSR_IA32_UCODE_REV has been available long before Linux 5.6,
which added it to the emulated MSR list, a bug caused the microcode
version to revert to 0x100000000 on INIT. As a result, processors other
than the bootstrap processor would not see the host microcode revision;
some Windows version complain loudly about this and crash with a
fairly explicit MICROCODE REVISION MISMATCH error.
[If running 5.6 prereleases, the kernel fix "KVM: x86: do not reset
microcode version on INIT or RESET" should also be applied.]
Reported-by: Alex Williamson <address@hidden>
Message-id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: be02cda3afde60d219786e23c3f8edb53aec8e17
https://github.com/qemu/qemu/commit/be02cda3afde60d219786e23c3f8edb53aec8e17
Author: Paolo Bonzini <address@hidden>
Date: 2020-02-12 (Wed, 12 Feb 2020)
Changed paths:
M target/i386/cpu.c
Log Message:
-----------
target/i386: enable monitor and ucode revision with -cpu max
These two features were incorrectly tied to host_cpuid_required rather than
cpu->max_features. As a result, -cpu max was not enabling either MONITOR
features or ucode revision.
Signed-off-by: Paolo Bonzini <address@hidden>
Commit: 81f49abaaac2b88062bd1b07f451d9527ed1c9ce
https://github.com/qemu/qemu/commit/81f49abaaac2b88062bd1b07f451d9527ed1c9ce
Author: Peter Maydell <address@hidden>
Date: 2020-02-13 (Thu, 13 Feb 2020)
Changed paths:
M bsd-user/syscall.c
M configure
M exec.c
M include/qemu/seqlock.h
M include/qemu/timer.h
M linux-user/exit.c
M linux-user/signal.c
M scripts/minikconf.py
M target/i386/cpu.c
M target/i386/kvm.c
M target/i386/misc_helper.c
M tests/check-block.sh
M util/qemu-timer-common.c
M vl.c
Log Message:
-----------
Merge remote-tracking branch 'remotes/bonzini/tags/for-upstream' into staging
* various small fixes and cleanups
* fixes for the ucode revision patch from the previous pull request
# gpg: Signature made Wed 12 Feb 2020 15:30:24 GMT
# gpg: using RSA key BFFBD25F78C7AE83
# gpg: Good signature from "Paolo Bonzini <address@hidden>" [full]
# gpg: aka "Paolo Bonzini <address@hidden>" [full]
# Primary key fingerprint: 46F5 9FBD 57D6 12E7 BFD4 E2F7 7E15 100C CD36 69B1
# Subkey fingerprint: F133 3857 4B66 2389 866C 7682 BFFB D25F 78C7 AE83
* remotes/bonzini/tags/for-upstream:
target/i386: enable monitor and ucode revision with -cpu max
target/i386: check for availability of MSR_IA32_UCODE_REV as an emulated MSR
target/i386: fix TCG UCODE_REV access
build: move TARGET_GPROF to config-host.mak
exec: do not define use_icount for user-mode emulation
minikconf: accept alnum identifiers
Remove support for CLOCK_MONOTONIC not being defined
seqlock: fix seqlock_write_unlock_impl function
vl: Don't mismatch g_strsplit()/g_free()
Signed-off-by: Peter Maydell <address@hidden>
Compare: https://github.com/qemu/qemu/compare/7ce9ce89930c...81f49abaaac2
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 490360: vl: Don't mismatch g_strsplit()/g_free(),
Peter Maydell <=