[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 11/36] test-throttle: Fix uninitialized use of burst_
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 11/36] test-throttle: Fix uninitialized use of burst_length |
Date: |
Tue, 20 Aug 2019 08:59:30 +0200 |
From: Andrey Shinkevich <address@hidden>
ThrottleState::cfg of the static variable 'ts' is reassigned with the
local one in the do_test_accounting() and then is passed to the
throttle_account() with uninitialized member LeakyBucket::burst_length.
Signed-off-by: Andrey Shinkevich <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/test-throttle.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tests/test-throttle.c b/tests/test-throttle.c
index a288122..ebf3aeb 100644
--- a/tests/test-throttle.c
+++ b/tests/test-throttle.c
@@ -557,6 +557,8 @@ static bool do_test_accounting(bool is_ops, /* are we
testing bps or ops */
BucketType index;
int i;
+ throttle_config_init(&cfg);
+
for (i = 0; i < 3; i++) {
BucketType index = to_test[is_ops][i];
cfg.buckets[index].avg = avg;
--
1.8.3.1
- [Qemu-devel] [PULL 00/36] QEMU patches for 2018-08-20, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 01/36] kvm: i386: halt poll control MSR support, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 02/36] target-i386: adds PV_SCHED_YIELD CPUID feature bit, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 03/36] loader: Handle memory-mapped ELFs, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 04/36] elf-ops.h: Map into memory the ELF to load, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 05/36] hw/i386/pc: Map into memory the initrd, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 07/36] configure: Define target access alignment in configure, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 06/36] memory: assert on out of scope notification, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 08/36] block: fix NetBSD qemu-iotests failure, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 10/36] target-i386: kvm: 'kvm_get_supported_msrs' cleanup, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 11/36] test-throttle: Fix uninitialized use of burst_length,
Paolo Bonzini <=
- [Qemu-devel] [PULL 09/36] 9p: simplify source file selection, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 13/36] i386/kvm: initialize struct at full before ioctl call, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 21/36] replay: add missing fix for internal function, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 24/36] replay: fix replay shutdown, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 22/36] replay: document development rules, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 30/36] cpus-common: assert BQL nesting within cpu-exclusive sections, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 31/36] kvm: vmxcap: Enhance with latest features, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 16/36] mc146818rtc: Remove reset notifiers, Paolo Bonzini, 2019/08/20
- [Qemu-devel] [PULL 15/36] memory: fix race between TCG and accesses to dirty bitmap, Paolo Bonzini, 2019/08/20