[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 24/52] tests: fix coroutine leak in /basic/entered
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 24/52] tests: fix coroutine leak in /basic/entered |
Date: |
Fri, 12 Jan 2018 12:30:48 +0100 |
From: Marc-André Lureau <address@hidden>
The coroutine is not finished by the time the test ends, resulting in
ASAN warning:
==7005==ERROR: LeakSanitizer: detected memory leaks
Direct leak of 312 byte(s) in 1 object(s) allocated from:
#0 0x7fd35290fa38 in __interceptor_calloc (/lib64/libasan.so.4+0xdea38)
#1 0x7fd3506c5f75 in g_malloc0 ../glib/gmem.c:124
#2 0x55994af03e47 in qemu_coroutine_new
/home/elmarco/src/qemu/util/coroutine-ucontext.c:144
#3 0x55994aefed99 in qemu_coroutine_create
/home/elmarco/src/qemu/util/qemu-coroutine.c:76
#4 0x55994ac1eb50 in verify_entered_step_1
/home/elmarco/src/qemu/tests/test-coroutine.c:80
#5 0x55994af03c75 in coroutine_trampoline
/home/elmarco/src/qemu/util/coroutine-ucontext.c:119
#6 0x7fd34ec02bef (/lib64/libc.so.6+0x50bef)
Do not yield() to let the coroutine terminate.
Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
---
tests/test-coroutine.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/tests/test-coroutine.c b/tests/test-coroutine.c
index abd97c2..76c6461 100644
--- a/tests/test-coroutine.c
+++ b/tests/test-coroutine.c
@@ -67,7 +67,6 @@ static void coroutine_fn verify_entered_step_2(void *opaque)
/* Once more to check it still works after yielding */
g_assert(qemu_coroutine_entered(caller));
g_assert(qemu_coroutine_entered(qemu_coroutine_self()));
- qemu_coroutine_yield();
}
static void coroutine_fn verify_entered_step_1(void *opaque)
--
1.8.3.1
- [Qemu-devel] [PULL 17/52] vl: fix direct firmware directories leak, (continued)
- [Qemu-devel] [PULL 17/52] vl: fix direct firmware directories leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 18/52] readline: add a free function, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 20/52] crypto: fix stack-buffer-overflow error, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 19/52] tests: fix migration-test leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 23/52] ucontext: annotate coroutine stack for ASAN, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 25/52] mips: fix potential fopen(NULL,...), Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 21/52] qemu-config: fix leak in query-command-line-options, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 22/52] tests: fix qmp-test leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 26/52] disas/s390: fix global-buffer-overflow, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 27/52] scsi-disk: release AioContext in unaligned WRITE SAME case, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 24/52] tests: fix coroutine leak in /basic/entered,
Paolo Bonzini <=
- [Qemu-devel] [PULL 28/52] tests/boot-serial-test: Add tests for microblaze boards, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 29/52] tests/boot-serial-test: Add a test for the moxiesim machine, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 32/52] target/i386: hax: change to use x86_update_hflags, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 31/52] target/i386: move hflags update code to a function, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 35/52] scripts/qemu-gdb: add simple tcg lock status helper, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 34/52] target-i386: update hflags on Hypervisor.framework, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 36/52] scripts/qemu-gdb/timers.py: new helper to dump timer state, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 33/52] target/i386: hax: Move x86_update_hflags., Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 30/52] tests/boot-serial-test: Add support for the raspi2 machine, Paolo Bonzini, 2018/01/12