1. 14 7月, 2020 1 次提交
    • Z
      migration: fix memory leak in qmp_migrate_set_parameters · 9728ebfb
      Zheng Chuan 提交于
      "tmp.tls_hostname" and "tmp.tls_creds" allocated by migrate_params_test_apply()
      is forgot to free at the end of qmp_migrate_set_parameters(). Fix that.
      
      The leak stack:
      Direct leak of 2 byte(s) in 2 object(s) allocated from:
         #0 0xffffb597c20b in __interceptor_malloc (/usr/lib64/libasan.so.4+0xd320b)
         #1 0xffffb52dcb1b in g_malloc (/usr/lib64/libglib-2.0.so.0+0x58b1b)
         #2 0xffffb52f8143 in g_strdup (/usr/lib64/libglib-2.0.so.0+0x74143)
         #3 0xaaaac52447fb in migrate_params_test_apply (/usr/src/debug/qemu-4.1.0/migration/migration.c:1377)
         #4 0xaaaac52fdca7 in qmp_migrate_set_parameters (/usr/src/debug/qemu-4.1.0/qapi/qapi-commands-migration.c:192)
         #5 0xaaaac551d543 in qmp_dispatch (/usr/src/debug/qemu-4.1.0/qapi/qmp-dispatch.c:165)
         #6 0xaaaac52a0a8f in qmp_dispatch (/usr/src/debug/qemu-4.1.0/monitor/qmp.c:125)
         #7 0xaaaac52a1c7f in monitor_qmp_dispatch (/usr/src/debug/qemu-4.1.0/monitor/qmp.c:214)
         #8 0xaaaac55cb0cf in aio_bh_call (/usr/src/debug/qemu-4.1.0/util/async.c:117)
         #9 0xaaaac55d4543 in aio_bh_poll (/usr/src/debug/qemu-4.1.0/util/aio-posix.c:459)
         #10 0xaaaac55cae0f in aio_dispatch (/usr/src/debug/qemu-4.1.0/util/async.c:268)
         #11 0xffffb52d6a7b in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x52a7b)
         #12 0xaaaac55d1e3b(/usr/bin/qemu-kvm-4.1.0+0x1622e3b)
         #13 0xaaaac4e314bb(/usr/bin/qemu-kvm-4.1.0+0xe824bb)
         #14 0xaaaac47f45ef(/usr/bin/qemu-kvm-4.1.0+0x8455ef)
         #15 0xffffb4bfef3f in __libc_start_main (/usr/lib64/libc.so.6+0x23f3f)
         #16 0xaaaac47ffacb(/usr/bin/qemu-kvm-4.1.0+0x850acb)
      
      Direct leak of 2 byte(s) in 2 object(s) allocated from:
         #0 0xffffb597c20b in __interceptor_malloc (/usr/lib64/libasan.so.4+0xd320b)
         #1 0xffffb52dcb1b in g_malloc (/usr/lib64/libglib-2.0.so.0+0x58b1b)
         #2 0xffffb52f8143 in g_strdup (/usr/lib64/libglib-2.0.so.0+0x74143)
         #3 0xaaaac5244893 in migrate_params_test_apply (/usr/src/debug/qemu-4.1.0/migration/migration.c:1382)
         #4 0xaaaac52fdca7 in qmp_migrate_set_parameters (/usr/src/debug/qemu-4.1.0/qapi/qapi-commands-migration.c:192)
         #5 0xaaaac551d543 in qmp_dispatch (/usr/src/debug/qemu-4.1.0/qapi/qmp-dispatch.c)
         #6 0xaaaac52a0a8f in qmp_dispatch (/usr/src/debug/qemu-4.1.0/monitor/qmp.c:125)
         #7 0xaaaac52a1c7f in monitor_qmp_dispatch (/usr/src/debug/qemu-4.1.0/monitor/qmp.c:214)
         #8 0xaaaac55cb0cf in aio_bh_call (/usr/src/debug/qemu-4.1.0/util/async.c:117)
         #9 0xaaaac55d4543 in aio_bh_poll (/usr/src/debug/qemu-4.1.0/util/aio-posix.c:459)
         #10 0xaaaac55cae0f in in aio_dispatch (/usr/src/debug/qemu-4.1.0/util/async.c:268)
         #11 0xffffb52d6a7b in g_main_context_dispatch (/usr/lib64/libglib-2.0.so.0+0x52a7b)
         #12 0xaaaac55d1e3b(/usr/bin/qemu-kvm-4.1.0+0x1622e3b)
         #13 0xaaaac4e314bb(/usr/bin/qemu-kvm-4.1.0+0xe824bb)
         #14 0xaaaac47f45ef (/usr/bin/qemu-kvm-4.1.0+0x8455ef)
         #15 0xffffb4bfef3f in __libc_start_main (/usr/lib64/libc.so.6+0x23f3f)
         #16 0xaaaac47ffacb(/usr/bin/qemu-kvm-4.1.0+0x850acb)
      Signed-off-by: NChuan Zheng <zhengchuan@huawei.com>
      Reviewed-by: NKeQian Zhu <zhukeqian1@huawei.com>
      Reviewed-by: NHaiLiang <zhang.zhanghailiang@huawei.com>
      Reviewed-by: NJuan Quintela <quintela@redhat.com>
      Signed-off-by: NJuan Quintela <quintela@redhat.com>
      9728ebfb
  2. 12 7月, 2020 2 次提交
    • P
      Merge remote-tracking branch 'remotes/stsquad/tags/pull-testing-and-misc-110720-2' into staging · 9f526fce
      Peter Maydell 提交于
      Testing and misc build updates:
      
        - tests/vm support for aarch64 VMs
        - tests/tcg better cross-compiler detection
        - update docker tooling to support registries
        - update docker support for xtensa
        - gitlab build docker images and store in registry
        - gitlab use docker images for builds
        - a number of skipIf updates to support move
        - linux-user MAP_FIXED_NOREPLACE fix
        - qht-bench compiler tweaks
        - configure fix for secret keyring
        - tsan fiber annotation clean-up
        - doc updates for mttcg/icount/gdbstub
        - fix cirrus to use brew bash for iotests
        - revert virtio-gpu breakage
        - fix LC_ALL to avoid sorting changes in iotests
      
      # gpg: Signature made Sat 11 Jul 2020 15:56:42 BST
      # gpg:                using RSA key 6685AE99E75167BCAFC8DF35FBD0DB095A9E2A44
      # gpg: Good signature from "Alex Bennée (Master Work Key) <alex.bennee@linaro.org>" [full]
      # Primary key fingerprint: 6685 AE99 E751 67BC AFC8  DF35 FBD0 DB09 5A9E 2A44
      
      * remotes/stsquad/tags/pull-testing-and-misc-110720-2: (50 commits)
        iotests: Set LC_ALL=C for sort
        Revert "vga: build virtio-gpu as module"
        tests: fix "make check-qtest" for modular builds
        .cirrus.yml: add bash to the brew packages
        tests/docker: update toolchain set in debian-xtensa-cross
        tests/docker: fall back more gracefully when pull fails
        docs: Add to gdbstub documentation the PhyMemMode
        docs/devel: add some notes on tcg-icount for developers
        docs/devel: convert and update MTTCG design document
        tests/qht-bench: Adjust threshold computation
        tests/qht-bench: Adjust testing rate by -1
        travis.yml: Test also the other targets on s390x
        shippable: pull images from registry instead of building
        testing: add check-build target
        containers.yml: build with docker.py tooling
        gitlab: limit re-builds of the containers
        tests: improve performance of device-introspect-test
        gitlab: add avocado asset caching
        gitlab: enable check-tcg for linux-user tests
        linux-user/elfload: use MAP_FIXED_NOREPLACE in pgb_reserved_va
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      9f526fce
    • P
      Merge remote-tracking branch 'remotes/philmd-gitlab/tags/avr-port-20200711' into staging · d3449830
      Peter Maydell 提交于
      8bit AVR port from Michael Rolnik.
      
      Michael started to work on the AVR port few years ago [*] and kept
      improving the code over various series.
      
      List of people who help him (in chronological order):
      - Richard Henderson
      - Sarah Harris and Edward Robbins
      - Philippe Mathieu-Daudé and Aleksandar Markovic
      - Pavel Dovgalyuk
      - Thomas Huth
      
      [*] The oldest contribution I could find on the list is from 2016:
      https://lists.nongnu.org/archive/html/qemu-devel/2016-06/msg02985.html
      
      Tests included:
      
      $ avocado --show=app run -t arch:avr tests/acceptance/
      Fetching asset from tests/acceptance/machine_avr6.py:AVR6Machine.test_freertos
       (1/1) tests/acceptance/machine_avr6.py:AVR6Machine.test_freertos: PASS (2.13 s)
      RESULTS    : PASS 1 | ERROR 0 | FAIL 0 | SKIP 0 | WARN 0 | INTERRUPT 0 | CANCEL 0
      JOB TIME   : 2.35 s
      
      $ make check-qtest-avr
        TEST    check-qtest-avr: tests/qtest/boot-serial-test
        TEST    check-qtest-avr: tests/qtest/cdrom-test
        TEST    check-qtest-avr: tests/qtest/device-introspect-test
        TEST    check-qtest-avr: tests/qtest/machine-none-test
        TEST    check-qtest-avr: tests/qtest/qmp-test
        TEST    check-qtest-avr: tests/qtest/qmp-cmd-test
        TEST    check-qtest-avr: tests/qtest/qom-test
        TEST    check-qtest-avr: tests/qtest/test-hmp
        TEST    check-qtest-avr: tests/qtest/qos-test
      
      CI results:
      . https://cirrus-ci.com/build/5697049146425344
      . https://gitlab.com/philmd/qemu/-/pipelines/165328058
      . https://travis-ci.org/github/philmd/qemu/builds/705817933
      . https://app.shippable.com/github/philmd/qemu/runs/822/summary/console
      
      # gpg: Signature made Sat 11 Jul 2020 10:03:11 BST
      # gpg:                using RSA key FAABE75E12917221DCFD6BB2E3E32C2CDEADC0DE
      # gpg: Good signature from "Philippe Mathieu-Daudé (F4BUG) <f4bug@amsat.org>" [full]
      # Primary key fingerprint: FAAB E75E 1291 7221 DCFD  6BB2 E3E3 2C2C DEAD C0DE
      
      * remotes/philmd-gitlab/tags/avr-port-20200711: (32 commits)
        target/avr/disas: Fix store instructions display order
        target/avr/cpu: Fix $PC displayed address
        target/avr/cpu: Drop tlb_flush() in avr_cpu_reset()
        target/avr: Add section into QEMU documentation
        tests/acceptance: Test the Arduino MEGA2560 board
        tests/boot-serial: Test some Arduino boards (AVR based)
        hw/avr: Add limited support for some Arduino boards
        hw/avr: Add some ATmega microcontrollers
        hw/avr: Add support for loading ELF/raw binaries
        hw/misc: avr: Add limited support for power reduction device
        hw/timer: avr: Add limited support for 16-bit timer peripheral
        hw/char: avr: Add limited support for USART peripheral
        tests/machine-none: Add AVR support
        target/avr: Register AVR support with the rest of QEMU
        target/avr: Add support for disassembling via option '-d in_asm'
        target/avr: Initialize TCG register variables
        target/avr: Add instruction translation - CPU main translation function
        target/avr: Add instruction translation - MCU Control Instructions
        target/avr: Add instruction translation - Bit and Bit-test Instructions
        target/avr: Add instruction translation - Data Transfer Instructions
        ...
      Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
      d3449830
  3. 11 7月, 2020 37 次提交