Re: [PATCH v1 09/12] perf cs-etm: Fall back to the recorded instruction size on a failed read
From: Leo Yan
Date: Fri Nov 13 2026 - 11:06:56 EST
Hi Arnaldo,
On Fri, Nov 13, 2026 at 12:05:50PM -0300, Arnaldo Carvalho de Melo wrote:
> From: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
>
> cs_etm__t32_instr_size() reads the instruction bytes from the traced
> program's memory to tell a 16-bit from a 32-bit T32 instruction, but it
> ignores cs_etm__frontend_mem_access() failing, which happens when the
> DSO or its debug data is missing, and then reads the uninitialized
> buffer. GCC 16 warns about it and build-test fails with -Werror.
>
> Use the instruction size recorded by the decoder, as the A32/A64 path
> already does, when the read doesn't return the full two bytes.
This patch is duplicate with:
https://lore.kernel.org/linux-perf-users/20261113-perf_fix_gcc15_failure-v1-0-eae592c5ff64@xxxxxxx/T/#m5f610e381705bc587a9ce3d31be4e1e0ed595506
I prefer that one, it handle cs_etm__frontend_mem_access() failure
throughly.