[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state |
Date: |
Tue, 15 May 2012 17:20:17 +0100 |
On 15 May 2012 17:08, Fabien Chouteau <address@hidden> wrote:
> On 05/15/2012 03:31 PM, Andreas Färber wrote:
>> Am 15.05.2012 11:39, schrieb Fabien Chouteau:
>>> Do not call cpu_dump_state if logfile is NULL.
>>
>> And where is log_cpu_state() being called from? Its caller is passing
>> NULL already then.
> No, logfile is a global variable. log_cpu_state() takes only CPUState
> and flags parameters.
The question is which of the following two options we want:
(1) callers should be guarding the calls to log_cpu_state() with
checks for qemu_log_enabled() or qemu_loglevel_mask()
(2) log_cpu_state() does its own check for whether logging is enabled
in the same way that qemu_log() and qemu_log_vprintf() do
At the moment most callers of log_cpu_state() do their own checks
as per (1), but you could make an argument that we should switch
to (2) instead.
-- PMM
- [Qemu-devel] [PATCH] PowerPC: Avoid segfault in cpu_dump_state, Fabien Chouteau, 2012/05/14
- Re: [Qemu-devel] [PATCH] PowerPC: Avoid segfault in cpu_dump_state, Peter Maydell, 2012/05/14
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Andreas Färber, 2012/05/15
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Fabien Chouteau, 2012/05/16
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Fabien Chouteau, 2012/05/16
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Fabien Chouteau, 2012/05/23
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Alexander Graf, 2012/05/30
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Fabien Chouteau, 2012/05/30
- Re: [Qemu-devel] [PATCH] Avoid segfault in cpu_dump_state, Andreas Färber, 2012/05/30