[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-commits] [qemu/qemu] 0170f3: hw/intc/apic: fix memory leak
From: |
Paolo Bonzini |
Subject: |
[Qemu-commits] [qemu/qemu] 0170f3: hw/intc/apic: fix memory leak |
Date: |
Tue, 05 Mar 2024 03:37:24 -0800 |
Branch: refs/heads/coverity
Home: https://github.com/qemu/qemu
Commit: 0170f3ea3daab19d8acdc824692ebc1b35b39f1b
https://github.com/qemu/qemu/commit/0170f3ea3daab19d8acdc824692ebc1b35b39f1b
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M hw/intc/apic.c
Log Message:
-----------
hw/intc/apic: fix memory leak
deliver_bitmask is allocated on the heap in apic_deliver(), but there
are many paths in the function that return before the corresponding
g_free() is reached. Fix this by switching to g_autofree and, while at
it, also switch to g_new. Do the same in apic_deliver_irq() as well
for consistency.
Fixes: b5ee0468e9d ("apic: add support for x2APIC mode", 2024-02-14)
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Reviewed-by: Bui Quang Minh <minhquangbui99@gmail.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: f0060d46918baf02dd679b53725426f7b15c50bf
https://github.com/qemu/qemu/commit/f0060d46918baf02dd679b53725426f7b15c50bf
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M util/oslib-posix.c
Log Message:
-----------
oslib-posix: fix memory leak in touch_all_pages
touch_all_pages() can return early, before creating threads. In this case,
however, it leaks the MemsetContext that it has allocated at the
beginning of the function.
Reported by Coverity as CID 1534922.
Fixes: 04accf43df8 ("oslib-posix: initialize backend memory objects in
parallel", 2024-02-06)
Reviewed-by: Mark Kanda <mark.kanda@oracle.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: ac056cbb54e7629792abc8067680d107beb65a8b
https://github.com/qemu/qemu/commit/ac056cbb54e7629792abc8067680d107beb65a8b
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M .gitlab-ci.d/buildtest.yml
M configs/devices/mips-softmmu/common.mak
M configs/devices/mips64el-softmmu/default.mak
M hw/display/Kconfig
M hw/mips/Kconfig
Log Message:
-----------
mips: do not list individual devices from configs/
Add new "select" and "imply" directives if needed. The resulting
config-devices.mak files are the same as before.
Builds without default devices will become much smaller
than before, and qtests fail (as expected, though suboptimal)
for mips64-softmmu because most tests do not use -nodefaults,
so remove it from build-without-defaults
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 395d5d09c7ac1b4a39c62eb0704ead120ea071ca
https://github.com/qemu/qemu/commit/395d5d09c7ac1b4a39c62eb0704ead120ea071ca
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M target/i386/tcg/emit.c.inc
M target/i386/tcg/translate.c
Log Message:
-----------
target/i386: use TSTEQ/TSTNE to test low bits
When testing the sign bit or equality to zero of a partial register, it
is useful to use a single TSTEQ or TSTNE operation. It can also be used
to test the parity flag, using bit 0 of the population count.
Do not do this for target_ulong-sized values however; the optimizer would
produce a comparison against zero anyway, and it avoids shifts by 64
which are undefined behavior.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: af870441278a8a1e986001e29dfd314d4a0aa68c
https://github.com/qemu/qemu/commit/af870441278a8a1e986001e29dfd314d4a0aa68c
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M target/i386/tcg/translate.c
Log Message:
-----------
target/i386: use TSTEQ/TSTNE to check flags
The new conditions obviously come in handy when testing individual bits
of EFLAGS, and they make it possible to remove the .mask field of
CCPrepare.
Lowering to shift+and is done by the optimizer if necessary.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: c80a048f383cebdefbf6a7a325e5fc74b1900bca
https://github.com/qemu/qemu/commit/c80a048f383cebdefbf6a7a325e5fc74b1900bca
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M target/i386/tcg/translate.c
Log Message:
-----------
target/i386: remove mask from CCPrepare
With the introduction of TSTEQ and TSTNE the .mask field is always -1,
so remove all the now-unnecessary code.
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: d8f4a7a80e76cc28ccf9d2912fbf0643ba232917
https://github.com/qemu/qemu/commit/d8f4a7a80e76cc28ccf9d2912fbf0643ba232917
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M scripts/coverity-scan/run-coverity-scan
Log Message:
-----------
run-coverity-scan: add --check-upload-only option
Add an option to check if upload is permitted without actually
attempting a build. This can be useful to add a third outcome
beyond success and failure---namely, a CI job can self-cancel
if the uploading quota has been reached.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 8f2860a14fa16be2d39f118ab5bf86fbc8f97d64
https://github.com/qemu/qemu/commit/8f2860a14fa16be2d39f118ab5bf86fbc8f97d64
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M .gitlab-ci.d/base.yml
M .gitlab-ci.d/buildtest.yml
M .gitlab-ci.d/opensbi.yml
Log Message:
-----------
gitlab-ci: add manual job to run Coverity
Add a job that can be run, either manually or on a schedule, to upload
a build to Coverity Scan. The job uses the run-coverity-scan script
in multiple phases of check, download tools and upload, in order to
avoid both wasting time (skip everything if you are above the upload
quota) and avoid filling the log with the progress of downloading
the tools.
The job is intended to run on a scheduled pipeline run, and scheduled
runs will not get any other job. It requires two variables to be in
GitLab CI, COVERITY_TOKEN and COVERITY_EMAIL. Those are already set up
in qemu-project's configuration as protected and masked variables.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Commit: 351cde6f72e3b88c4979b020dd469731df36433b
https://github.com/qemu/qemu/commit/351cde6f72e3b88c4979b020dd469731df36433b
Author: Paolo Bonzini <pbonzini@redhat.com>
Date: 2024-03-05 (Tue, 05 Mar 2024)
Changed paths:
M .gitlab-ci.d/buildtest.yml
Log Message:
-----------
test rules
Compare: https://github.com/qemu/qemu/compare/8d085756cde6...351cde6f72e3
To unsubscribe from these emails, change your notification settings at
https://github.com/qemu/qemu/settings/notifications
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Qemu-commits] [qemu/qemu] 0170f3: hw/intc/apic: fix memory leak,
Paolo Bonzini <=