mirror of https://gitlab.com/qemu-project/qemu
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
![]() There are a number of resource leaks in gen-vdso. In theory they are harmless because this is a short lived process, but when building QEMU with --extra-cflags="-fsanitize=address" problems ensure. The gen-vdso program is run as part of the build, and that aborts due to the sanitizer identifying memory leaks, leaving QEMU unbuildable. FAILED: libqemu-x86_64-linux-user.a.p/vdso.c.inc /var/home/berrange/src/virt/qemu/build/linux-user/gen-vdso -o libqemu-x86_64-linux-user.a.p/vdso.c.inc ../linux-user/x86_64/vdso.so ================================================================= ==1696332==ERROR: LeakSanitizer: detected memory leaks Direct leak of 2968 byte(s) in 1 object(s) allocated from: #0 0x56495873f1f3 (/var/home/berrange/src/virt/qemu/build/linux-user/gen-vdso+0xa11f3) (BuildId: b69e241ad44719b6f3934f3c71dfc6727e8bdb12) #1 0x564958780b90 (/var/home/berrange/src/virt/qemu/build/linux-user/gen-vdso+0xe2b90) (BuildId: b69e241ad44719b6f3934f3c71dfc6727e8bdb12) This complaint is about the 'buf' variable, however, the FILE objects are also leaked in some error scenarios, so this fix refactors the cleanup paths to fix all leaks. For completeness it also reports an error if fclose() fails on 'inf'. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Tested-by: Arusekk <floss@arusekk.pl> Signed-off-by: Richard Henderson <richard.henderson@linaro.org> Message-ID: <20250513150346.1328217-1-berrange@redhat.com> |
5 days ago | |
---|---|---|
.. | ||
aarch64 | 4 months ago | |
alpha | 4 months ago | |
arm | 2 weeks ago | |
generic | 4 months ago | |
hexagon | 6 months ago | |
hppa | 1 month ago | |
i386 | 4 months ago | |
include | ||
loongarch64 | 2 months ago | |
m68k | 4 months ago | |
microblaze | 4 months ago | |
mips | 6 months ago | |
mips64 | ||
openrisc | 6 months ago | |
ppc | 4 months ago | |
riscv | 6 months ago | |
s390x | 4 months ago | |
sh4 | 4 months ago | |
sparc | 5 months ago | |
x86_64 | 4 months ago | |
xtensa | 2 months ago | |
elfload.c | 5 days ago | |
errnos.c.inc | ||
exit.c | ||
fd-trans.c | 5 months ago | |
fd-trans.h | ||
flat.h | ||
flatload.c | 2 months ago | |
gen-vdso-elfn.c.inc | 8 months ago | |
gen-vdso.c | 5 days ago | |
ioctls.h | ||
linux_loop.h | ||
linuxload.c | ||
loader.h | ||
main.c | 2 months ago | |
meson.build | 4 months ago | |
mmap.c | 2 months ago | |
plugin-api.c | 4 months ago | |
qemu.h | 2 months ago | |
semihost.c | ||
signal-common.h | 5 months ago | |
signal.c | 2 months ago | |
socket.h | ||
strace.c | 7 months ago | |
strace.h | ||
strace.list | ||
syscall.c | 1 month ago | |
syscall_defs.h | 3 months ago | |
syscall_types.h | ||
thunk.c | ||
trace-events | ||
trace.h | ||
uaccess.c | ||
uname.c | ||
uname.h | ||
user-internals.h | 2 months ago | |
user-mmap.h | 4 months ago | |
vm86.c |