Hi Serhei,

Since this was originally your code, could you take a peek?
See also
https://patchwork.sourceware.org/project/elfutils/patch/[email protected]/

Thanks

On Mon, 2026-05-04 at 21:15 +0200, Mark Wielaard wrote:
> On Mon, May 04, 2026 at 12:35:58PM -0400, Aaron Merey wrote:
> > Hi Mark,
> > 
> > On Mon, May 4, 2026 at 11:55 AM Mark Wielaard <[email protected]> wrote:
> > > 
> > >         * libebl/eblinitreg_sample.c (ebl_sample_perf_regs_mapping):
> > >         Return false when calloc fails.
> > > 
> > > Signed-off-by: Mark Wielaard <[email protected]>
> > 
> > LGTM.
> 
> Thanks. But reading it over again I think we also shouldn't set
> cached_perf_regs_mask if cached_regs_mapping is NULL. Because we check
> that just above. It is unlikely that after the calloc fail we get back
> at ebl_sample_perf_regs_mapping, but better to keep things as
> consistent as possible just in case.
> 
> How about the attached?
> 
> Cheers,
> 
> Mark

Reply via email to