qemu-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-commits] [qemu/qemu] 1e2713: tests: fix test-qga leaks


From: GitHub
Subject: [Qemu-commits] [qemu/qemu] 1e2713: tests: fix test-qga leaks
Date: Fri, 09 Sep 2016 03:30:07 -0700

  Branch: refs/heads/master
  Home:   https://github.com/qemu/qemu
  Commit: 1e2713384c58037ad44f716c31c08daca18862c5
      
https://github.com/qemu/qemu/commit/1e2713384c58037ad44f716c31c08daca18862c5
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/test-qga.c

  Log Message:
  -----------
  tests: fix test-qga leaks

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 5c7e3e9fb1d7fd3f542fce83ef1d911196d48e11
      
https://github.com/qemu/qemu/commit/5c7e3e9fb1d7fd3f542fce83ef1d911196d48e11
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M include/glib-compat.h

  Log Message:
  -----------
  glib-compat: add g_(s)list_free_full()

Those functions are only available since glib 2.28.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: 2aa67a919680ed62bbfc77fffbda2ab2e9490d03
      
https://github.com/qemu/qemu/commit/2aa67a919680ed62bbfc77fffbda2ab2e9490d03
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M qga/main.c

  Log Message:
  -----------
  qga: free the whole blacklist

Free the config blacklist list, not just the elements. Do it so in the
more appropriate function config_free().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 3e3e302ff388669d811077248aee45c45a14168e
      
https://github.com/qemu/qemu/commit/3e3e302ff388669d811077248aee45c45a14168e
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M qga/guest-agent-command-state.c
    M qga/guest-agent-core.h
    M qga/main.c

  Log Message:
  -----------
  qga: free remaining leaking state

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: d6f723b513a0c3c4e58343b7c52a2f9850861fa0
      
https://github.com/qemu/qemu/commit/d6f723b513a0c3c4e58343b7c52a2f9850861fa0
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/test-cutils.c

  Log Message:
  -----------
  tests: fix test-cutils leaks

Spotted thanks to ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 4ae3c0e27fff7e41fd75fc63a35703bc64785863
      
https://github.com/qemu/qemu/commit/4ae3c0e27fff7e41fd75fc63a35703bc64785863
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/test-vmstate.c

  Log Message:
  -----------
  tests: fix test-vmstate leaks

Spotted thanks to ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: d55f295b2b5477528da601dba57880b0d5f24cb1
      
https://github.com/qemu/qemu/commit/d55f295b2b5477528da601dba57880b0d5f24cb1
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/test-iov.c

  Log Message:
  -----------
  tests: fix test-iov leaks

Spotted thanks to ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 265804b5d755502438b4d42a3682f54e03ea4d32
      
https://github.com/qemu/qemu/commit/265804b5d755502438b4d42a3682f54e03ea4d32
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/check-qom-interface.c

  Log Message:
  -----------
  tests: fix check-qom-interface leaks

Found thanks to ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 3972a4884ddffcdd1037f5ec2a5a514784bdcec9
      
https://github.com/qemu/qemu/commit/3972a4884ddffcdd1037f5ec2a5a514784bdcec9
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/check-qom-proplist.c

  Log Message:
  -----------
  tests: fix check-qom-proplist leaks

Found thanks to ASAN.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: bd794065ffffe10721b6a95f1db52f2cc7953196
      
https://github.com/qemu/qemu/commit/bd794065ffffe10721b6a95f1db52f2cc7953196
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/test-string-input-visitor.c

  Log Message:
  -----------
  tests: fix leak in test-string-input-visitor

Free the list returned by visit_type_intList().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: e305a16510afa74eec20390479e349402e55ef4c
      
https://github.com/qemu/qemu/commit/e305a16510afa74eec20390479e349402e55ef4c
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/audio/gus.c
    M hw/audio/sb16.c
    M hw/block/fdc.c
    M hw/char/parallel.c
    M hw/display/vga-isa.c
    M hw/dma/i8257.c
    M hw/ide/core.c
    M hw/isa/isa-bus.c
    M include/hw/ide/internal.h
    M include/hw/isa/i8257.h
    M include/hw/isa/isa.h

  Log Message:
  -----------
  portio: keep references on portio

The isa_register_portio_list() function allocates ioports
data/state. Let's keep the reference to this data on some owner.  This
isn't enough to fix leaks, but at least, ASAN stops complaining of
direct leaks. Further cleanup would require calling
portio_list_del/destroy().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>


  Commit: d80fe99de48b39dbb5f9f8d1d958b87a9bfeb853
      
https://github.com/qemu/qemu/commit/d80fe99de48b39dbb5f9f8d1d958b87a9bfeb853
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/i386/pc.c
    M hw/input/pckbd.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: simplify passing qemu_irq

qemu_irq is already a pointer, no need to have an extra pointer level.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: ac64c5fdf8c1e470cfca94d7ad5686770e6e470a
      
https://github.com/qemu/qemu/commit/ac64c5fdf8c1e470cfca94d7ad5686770e6e470a
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/i386/pc.c

  Log Message:
  -----------
  pc: don't leak a20_line

The irqs array is no longer being used

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827
      
https://github.com/qemu/qemu/commit/8ea753718b2d1a42e9ce7b8db9f5e4e1f330e827
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/core/machine.c
    M include/hw/boards.h
    M include/hw/i386/pc.h

  Log Message:
  -----------
  machine: use class base init generated name

machine_class_base_init() member name is allocated by
machine_class_base_init(), but not freed by
machine_class_finalize().  Simply freeing there doesn't work,
because DEFINE_PC_MACHINE() overwrites it with a literal string.

Fix DEFINE_PC_MACHINE() not to overwrite it, and add the missing
free to machine_class_finalize().

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: 354fb471bd5faf527f3fa25388b8cffa6bd937d0
      
https://github.com/qemu/qemu/commit/354fb471bd5faf527f3fa25388b8cffa6bd937d0
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/i386/acpi-build.c

  Log Message:
  -----------
  acpi-build: fix array leak

The free_ranges array is used as a temporary pointer array, the segment
should still be freed, however, it shouldn't free the elements themself.

Signed-off-by: Marc-André Lureau <address@hidden>
Tested-by: Marcel Apfelbaum <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>


  Commit: ff1685a3338072be9a94ab8a8f529c12e4265224
      
https://github.com/qemu/qemu/commit/ff1685a3338072be9a94ab8a8f529c12e4265224
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/qom-test.c

  Log Message:
  -----------
  tests: fix qom-test leaks

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 8197e24c38408132496025352b5eaf2c2df374f7
      
https://github.com/qemu/qemu/commit/8197e24c38408132496025352b5eaf2c2df374f7
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/i386/pc_q35.c

  Log Message:
  -----------
  pc: free i8259

Simiarly to 2ba154cf4eb8636cdd3aa90f392ca9e77206ca39

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Marcel Apfelbaum <address@hidden>


  Commit: 3e6c0c4c2cc4d5ee77f6f2746c4608f077e10f62
      
https://github.com/qemu/qemu/commit/3e6c0c4c2cc4d5ee77f6f2746c4608f077e10f62
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M include/hw/i386/pc.h

  Log Message:
  -----------
  pc: keep gsi reference

Further cleanup would need to call qemu_free_irq() at the appropriate
time, but for now this silences ASAN about direct leaks.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>


  Commit: 5ba344013c2def84483f83881a631fb18f14ed42
      
https://github.com/qemu/qemu/commit/5ba344013c2def84483f83881a631fb18f14ed42
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/sd/sd.c

  Log Message:
  -----------
  sd: free timer

Free the timer allocated in instance_init.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Andrew Baumann <address@hidden>


  Commit: e9529768d4786414725a9675991aeb466a6d600c
      
https://github.com/qemu/qemu/commit/e9529768d4786414725a9675991aeb466a6d600c
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/ipmi/ipmi_bmc_extern.c

  Log Message:
  -----------
  ipmi: free extern timer

Free the timer allocated during instance init.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Corey Minyard <address@hidden>


  Commit: f73480c36f49562556b80bb5bf8acc45e20dcca1
      
https://github.com/qemu/qemu/commit/f73480c36f49562556b80bb5bf8acc45e20dcca1
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/core/bus.c
    M include/hw/qdev-core.h

  Log Message:
  -----------
  bus: simplify name handling

Simplify a bit the code by using g_strdup_printf() and store it in a
non-const value so casting is no longer needed, and ownership is
clearer.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 822e36ca358c20406c34b7cb585d1ce2456027d5
      
https://github.com/qemu/qemu/commit/822e36ca358c20406c34b7cb585d1ce2456027d5
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/libqtest.c
    M tests/libqtest.h

  Log Message:
  -----------
  tests: add qtest_add_data_func_full

Allows one to specify a destroy function for the test data.

Add a fallback using glib g_test_add_vtable() internal function, whose
signature changed over time. Tested with glib 2.22, 2.26 and 2.48, which
according to git log should be enough to cover all variations.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 34e46f604d3cf26144b4e02989f2f096e3dc2a41
      
https://github.com/qemu/qemu/commit/34e46f604d3cf26144b4e02989f2f096e3dc2a41
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/pc-cpu-test.c

  Log Message:
  -----------
  tests: pc-cpu-test leaks fixes

The path is allocated and should be freed.

The qmp response should be unref, but then 'machine' must be duplicated.

Use a destroy function for the PCTestData.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 5b1ded224f46d56053f419cf24c1335b6dde40ee
      
https://github.com/qemu/qemu/commit/5b1ded224f46d56053f419cf24c1335b6dde40ee
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/postcopy-test.c

  Log Message:
  -----------
  tests: fix rsp leak in postcopy-test

In all cases, even when the dict doesn't contain 'ram', the qmp response
must be unref.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: e2dd21e510ed66daeb4c5d58638450c1fb8c6fea
      
https://github.com/qemu/qemu/commit/e2dd21e510ed66daeb4c5d58638450c1fb8c6fea
  Author: Marc-André Lureau <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M tests/postcopy-test.c

  Log Message:
  -----------
  tests: fix postcopy-test leaks

A few strings are allocated and never freed.

Signed-off-by: Marc-André Lureau <address@hidden>
Reviewed-by: Eric Blake <address@hidden>


  Commit: 33e60e01988b02ac9baf4dc0f4a452b39fb5ce55
      
https://github.com/qemu/qemu/commit/33e60e01988b02ac9baf4dc0f4a452b39fb5ce55
  Author: Peter Maydell <address@hidden>
  Date:   2016-09-08 (Thu, 08 Sep 2016)

  Changed paths:
    M hw/audio/gus.c
    M hw/audio/sb16.c
    M hw/block/fdc.c
    M hw/char/parallel.c
    M hw/core/bus.c
    M hw/core/machine.c
    M hw/display/vga-isa.c
    M hw/dma/i8257.c
    M hw/i386/acpi-build.c
    M hw/i386/pc.c
    M hw/i386/pc_piix.c
    M hw/i386/pc_q35.c
    M hw/ide/core.c
    M hw/input/pckbd.c
    M hw/ipmi/ipmi_bmc_extern.c
    M hw/isa/isa-bus.c
    M hw/sd/sd.c
    M include/glib-compat.h
    M include/hw/boards.h
    M include/hw/i386/pc.h
    M include/hw/ide/internal.h
    M include/hw/isa/i8257.h
    M include/hw/isa/isa.h
    M include/hw/qdev-core.h
    M qga/guest-agent-command-state.c
    M qga/guest-agent-core.h
    M qga/main.c
    M tests/check-qom-interface.c
    M tests/check-qom-proplist.c
    M tests/libqtest.c
    M tests/libqtest.h
    M tests/pc-cpu-test.c
    M tests/postcopy-test.c
    M tests/qom-test.c
    M tests/test-cutils.c
    M tests/test-iov.c
    M tests/test-qga.c
    M tests/test-string-input-visitor.c
    M tests/test-vmstate.c

  Log Message:
  -----------
  Merge remote-tracking branch 'remotes/elmarco/tags/leak-pull-request' into 
staging

Pull request

v2:
- dropped "tests: fix small leak in test-io-channel-command" that Daniel 
Berrange will pick
- fixed "tests: add qtest_add_data_func_full" to work with glib < 2.26

# gpg: Signature made Thu 08 Sep 2016 15:16:54 BST
# gpg:                using RSA key 0xDAE8E10975969CE5
# gpg: Good signature from "Marc-André Lureau <address@hidden>"
# gpg:                 aka "Marc-André Lureau <address@hidden>"
# gpg: WARNING: This key is not certified with sufficiently trusted signatures!
# gpg:          It is not certain that the signature belongs to the owner.
# Primary key fingerprint: 87A9 BD93 3F87 C606 D276  F62D DAE8 E109 7596 9CE5

* remotes/elmarco/tags/leak-pull-request: (25 commits)
  tests: fix postcopy-test leaks
  tests: fix rsp leak in postcopy-test
  tests: pc-cpu-test leaks fixes
  tests: add qtest_add_data_func_full
  bus: simplify name handling
  ipmi: free extern timer
  sd: free timer
  pc: keep gsi reference
  pc: free i8259
  tests: fix qom-test leaks
  acpi-build: fix array leak
  machine: use class base init generated name
  pc: don't leak a20_line
  pc: simplify passing qemu_irq
  portio: keep references on portio
  tests: fix leak in test-string-input-visitor
  tests: fix check-qom-proplist leaks
  tests: fix check-qom-interface leaks
  tests: fix test-iov leaks
  tests: fix test-vmstate leaks
  ...

Signed-off-by: Peter Maydell <address@hidden>


Compare: https://github.com/qemu/qemu/compare/59351d9b40b1...33e60e01988b

reply via email to

[Prev in Thread] Current Thread [Next in Thread]