Re: [PATCH 1/1 perf-tools] perf machine: Initialize machine->env to address a segfault

From: Namhyung Kim
Date: Tue Dec 03 2024 - 17:26:30 EST


On Tue, 26 Nov 2024 11:47:25 -0300, Arnaldo Carvalho de Melo wrote:

> Its used from trace__run(), for the 'perf trace' live mode, i.e. its
> strace-like, non-perf.data file processing mode, the most common one.
>
> The trace__run() function will set trace->host using machine__new_host()
> that is supposed to give a machine instance representing the running
> machine, and since we'll use perf_env__arch_strerrno() to get the right
> errno -> string table, we need to use machine->env, so initialize it in
> machine__new_host().
>
> [...]

Applied to perf-tools, thanks!

Best regards,
Namhyung