All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/37] Various memory leak fixes
@ 2016-07-19  8:53 marcandre.lureau
  2016-07-19  8:53 ` [Qemu-devel] [PATCH 01/37] build-sys: use an override for CFLAGS filter marcandre.lureau
                   ` (36 more replies)
  0 siblings, 37 replies; 79+ messages in thread
From: marcandre.lureau @ 2016-07-19  8:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: Marc-André Lureau

From: Marc-André Lureau <marcandre.lureau@redhat.com>

Hi,

Thanks to AddressSanitizer (ASAN), I found a number of direct leaks
worth fixing. Note that there are probably many indirect leaks left (I
am adding some here), I haven't investigated much yet.

There are still a number of direct leaks remaining, in particular in
the tests, but my libc doesn't give me good backtraces.

In order to easily switch to asan-enabled build, I make use of make
CFLAGS argument, which is why the first patch is also there.

The series is also available for convenience in
https://github.com/elmarco/qemu leak branch.

Marc-André Lureau (37):
  build-sys: use an override for CFLAGS filter
  tests: fix test-qga leaks
  qga: free the whole blacklist
  qga: free remaining leaking state
  tests: fix test-cutils leaks
  tests: fix test-vmstate leaks
  tests: fix test-iov leaks
  qdist: fix entries memory leak
  tests: fix check-qom-interface leaks
  tests: fix check-qom-proplist leaks
  tests: fix small leak in test-io-channel-command
  tests: fix leak in test-string-input-visitor
  portio: keep references on portio
  numa: do not leak NumaOptions
  pc: simplify passing qemu_irq
  pc: don't leak a20_line
  machine: use class base init generated name
  acpi-build: fix array leak
  char: disconnect peer when qemu_chr_free()
  char: free MuxDriver when closing
  tests: fix qom-test leaks
  pc: free i8259
  pci-bus: do not allocate and leak bsel
  pc: keep gsi reference
  ahci: free irqs array
  sd: free timer
  qjson: free str
  virtio-input: free config list
  ipmi: free extern timer
  usb: free USBDevice.strings
  tests: free a bunch of qmp responses
  usb: free leaking path
  bus: simplify name handling
  tests: pc-cpu-test
  tests: fix rsp leak in postcopy-test
  ahci: fix sglist leak on retry
  tests: fix postcopy-test leaks

 hw/audio/gus.c                    |  9 ++++++---
 hw/audio/sb16.c                   |  4 +++-
 hw/block/fdc.c                    |  4 +++-
 hw/char/parallel.c                |  3 ++-
 hw/core/bus.c                     | 21 ++++++---------------
 hw/core/machine.c                 |  1 +
 hw/display/vga-isa.c              |  8 ++++++--
 hw/dma/i8257.c                    |  6 ++++--
 hw/i386/acpi-build.c              | 11 ++++-------
 hw/i386/pc.c                      |  9 +++++----
 hw/i386/pc_piix.c                 |  1 +
 hw/i386/pc_q35.c                  |  3 +++
 hw/ide/ahci.c                     |  3 +++
 hw/ide/core.c                     |  6 ++++--
 hw/input/pckbd.c                  |  4 ++--
 hw/input/virtio-input-hid.c       |  1 +
 hw/input/virtio-input.c           | 10 ++++++++++
 hw/ipmi/ipmi_bmc_extern.c         |  9 +++++++++
 hw/isa/isa-bus.c                  | 14 +++++---------
 hw/sd/sd.c                        |  9 +++++++++
 hw/usb/bus.c                      |  7 +++++++
 hw/usb/desc.c                     |  1 +
 include/hw/boards.h               |  3 ++-
 include/hw/i386/pc.h              |  3 +--
 include/hw/ide/internal.h         |  2 ++
 include/hw/isa/i8257.h            |  2 ++
 include/hw/isa/isa.h              |  5 ++++-
 include/hw/pci/pci_bus.h          |  1 +
 include/hw/qdev-core.h            |  2 +-
 include/hw/virtio/virtio-input.h  |  1 +
 migration/qjson.c                 |  1 +
 numa.c                            | 15 ++++++++-------
 pc-bios/optionrom/Makefile        |  4 ++--
 qemu-char.c                       | 10 ++++++++++
 qga/guest-agent-command-state.c   |  6 ++++++
 qga/guest-agent-core.h            |  1 +
 qga/main.c                        | 13 +++++++------
 tests/check-qom-interface.c       |  1 +
 tests/check-qom-proplist.c        | 16 ++++++++++++++++
 tests/libqos/usb.c                |  1 +
 tests/pc-cpu-test.c               |  8 ++++++--
 tests/postcopy-test.c             |  9 ++++++---
 tests/pvpanic-test.c              |  1 +
 tests/qom-test.c                  |  5 +++--
 tests/test-cutils.c               | 24 ++++++++++++++++--------
 tests/test-filter-mirror.c        |  4 +++-
 tests/test-filter-redirector.c    |  8 ++++++--
 tests/test-io-channel-command.c   |  3 ++-
 tests/test-iov.c                  |  7 +++++++
 tests/test-qga.c                  |  5 +++++
 tests/test-string-input-visitor.c |  1 +
 tests/test-vmstate.c              |  8 ++++++--
 tests/virtio-blk-test.c           | 19 +++++++++++++------
 tests/virtio-net-test.c           | 10 +++++++---
 util/qdist.c                      |  3 ++-
 55 files changed, 246 insertions(+), 100 deletions(-)

-- 
2.9.0

^ permalink raw reply	[flat|nested] 79+ messages in thread

end of thread, other threads:[~2016-07-28 11:48 UTC | newest]

Thread overview: 79+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-19  8:53 [Qemu-devel] [PATCH 00/37] Various memory leak fixes marcandre.lureau
2016-07-19  8:53 ` [Qemu-devel] [PATCH 01/37] build-sys: use an override for CFLAGS filter marcandre.lureau
2016-07-19  8:53 ` [Qemu-devel] [PATCH 02/37] tests: fix test-qga leaks marcandre.lureau
2016-07-19 18:40   ` Eric Blake
2016-07-19  8:53 ` [Qemu-devel] [PATCH 03/37] qga: free the whole blacklist marcandre.lureau
2016-07-19 18:22   ` Eric Blake
2016-07-19  8:53 ` [Qemu-devel] [PATCH 04/37] qga: free remaining leaking state marcandre.lureau
2016-07-19 18:39   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 05/37] tests: fix test-cutils leaks marcandre.lureau
2016-07-19 18:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 06/37] tests: fix test-vmstate leaks marcandre.lureau
2016-07-19 18:41   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 07/37] tests: fix test-iov leaks marcandre.lureau
2016-07-19 20:46   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 08/37] qdist: fix entries memory leak marcandre.lureau
2016-07-19 20:54   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 09/37] tests: fix check-qom-interface leaks marcandre.lureau
2016-07-19 20:55   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 10/37] tests: fix check-qom-proplist leaks marcandre.lureau
2016-07-19 21:01   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 11/37] tests: fix small leak in test-io-channel-command marcandre.lureau
2016-07-19 21:04   ` Eric Blake
2016-07-19 21:16     ` Marc-André Lureau
2016-07-21 10:39       ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 12/37] tests: fix leak in test-string-input-visitor marcandre.lureau
2016-07-19 23:37   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 13/37] portio: keep references on portio marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 14/37] numa: do not leak NumaOptions marcandre.lureau
2016-07-19 23:39   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 15/37] pc: simplify passing qemu_irq marcandre.lureau
2016-07-19 23:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 16/37] pc: don't leak a20_line marcandre.lureau
2016-07-19 23:40   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 17/37] machine: use class base init generated name marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 18/37] acpi-build: fix array leak marcandre.lureau
2016-07-21 14:52   ` Marcel Apfelbaum
2016-07-21 15:48     ` Marc-André Lureau
2016-07-21 15:51       ` Marcel Apfelbaum
2016-07-21 16:47         ` Marcel Apfelbaum
2016-07-19  8:54 ` [Qemu-devel] [PATCH 19/37] char: disconnect peer when qemu_chr_free() marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 20/37] char: free MuxDriver when closing marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 21/37] tests: fix qom-test leaks marcandre.lureau
2016-07-19 23:50   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 22/37] pc: free i8259 marcandre.lureau
2016-07-28 11:47   ` Marcel Apfelbaum
2016-07-19  8:54 ` [Qemu-devel] [PATCH 23/37] pci-bus: do not allocate and leak bsel marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 24/37] pc: keep gsi reference marcandre.lureau
2016-07-21 17:18   ` Eduardo Habkost
2016-07-21 17:27     ` Marc-André Lureau
2016-07-21 18:07       ` Eduardo Habkost
2016-07-21 18:28         ` Marc-André Lureau
2016-07-21 19:44           ` Eduardo Habkost
2016-07-19  8:54 ` [Qemu-devel] [PATCH 25/37] ahci: free irqs array marcandre.lureau
2016-07-19 18:50   ` John Snow
2016-07-19  8:54 ` [Qemu-devel] [PATCH 26/37] sd: free timer marcandre.lureau
     [not found]   ` <CAJ+F1CLiqgK_eOM2S3u8Vc4TR-Mi9DPW-LG3PdbgT9-5b49FGg@mail.gmail.com>
2016-07-21 16:53     ` Andrew Baumann
2016-07-21 17:17       ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 27/37] qjson: free str marcandre.lureau
2016-07-20 12:25   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 28/37] virtio-input: free config list marcandre.lureau
2016-07-22  7:58   ` Gerd Hoffmann
2016-07-22  8:20     ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 29/37] ipmi: free extern timer marcandre.lureau
2016-07-21 13:05   ` Corey Minyard
2016-07-21 13:10     ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 30/37] usb: free USBDevice.strings marcandre.lureau
2016-07-22  7:59   ` Gerd Hoffmann
2016-07-19  8:54 ` [Qemu-devel] [PATCH 31/37] tests: free a bunch of qmp responses marcandre.lureau
2016-07-20 13:16   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 32/37] usb: free leaking path marcandre.lureau
2016-07-22  8:00   ` Gerd Hoffmann
2016-07-19  8:54 ` [Qemu-devel] [PATCH 33/37] bus: simplify name handling marcandre.lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 34/37] tests: pc-cpu-test marcandre.lureau
2016-07-19  9:04   ` Marc-André Lureau
2016-07-19  8:54 ` [Qemu-devel] [PATCH 35/37] tests: fix rsp leak in postcopy-test marcandre.lureau
2016-07-20 13:48   ` Eric Blake
2016-07-19  8:54 ` [Qemu-devel] [PATCH 36/37] ahci: fix sglist leak on retry marcandre.lureau
2016-07-19 20:45   ` John Snow
2016-07-19  8:54 ` [Qemu-devel] [PATCH 37/37] tests: fix postcopy-test leaks marcandre.lureau

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.