On 3/5/2020 4:34 PM, David Hildenbrand wrote:
>
>> #if !defined(CONFIG_USER_ONLY)
>> MachineState *ms = MACHINE(qdev_get_machine());
>> unsigned int max_cpus = ms->smp.max_cpus;
>> +
>> +cpu->env.tod_timer =
>> +timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu);
>> +
> #if !defined(CONFIG_USER_ONLY)
> MachineState *ms = MACHINE(qdev_get_machine());
> unsigned int max_cpus = ms->smp.max_cpus;
> +
> +cpu->env.tod_timer =
> +timer_new_ns(QEMU_CLOCK_VIRTUAL, s390x_tod_timer, cpu);
> +cpu->env.cpu_timer =
> +timer_new_ns(QEMU_CLO
This patch fix memleaks when we call tests/qtest/cpu-plug-test on s390x. The
leak stack is as follow:
Direct leak of 48 byte(s) in 1 object(s) allocated from:
#0 0x7fb43c7cd970 in __interceptor_calloc (/lib64/libasan.so.5+0xef970)
#1 0x7fb43be2149d in g_malloc0 (/lib64/libglib-2.0.so.0+0x