qemu-devel
[Top][All Lists]
Advanced

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

Re: [PATCH v4 07/11] disas: Cleanup plugin_disas


From: Alex Bennée
Subject: Re: [PATCH v4 07/11] disas: Cleanup plugin_disas
Date: Tue, 22 Sep 2020 11:38:46 +0100
User-agent: mu4e 1.5.5; emacs 28.0.50

Richard Henderson <richard.henderson@linaro.org> writes:

> Do not retain a GString in thread-local storage.  Allocate a
> new one and free it on every invocation.  Do not g_strdup the
> result; return the buffer from the GString.  Do not use
> warn_report.
>
> Using cs_disasm allocated memory via the &insn parameter, but
> that was never freed.  Use cs_disasm_iter so that we use the
> memory that we've already allocated, and so that we only try
> to disassemble one insn, as desired.  Do not allocate 1k to
> hold the bytes for a single instruction.
>
> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

Reviewed-by: Alex Bennée <alex.bennee@linaro.org>

-- 
Alex Bennée



reply via email to

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