On Fri, Apr 07, 2023 at 12:21:16PM -0700, Tyler Retzlaff wrote:
> On Wed, Apr 05, 2023 at 04:44:10PM +0100, Bruce Richardson wrote:
> > On Alpine linux, the telemetry_data_autotest was failing for the
> > test where we had dictionaries embedded in other dictionaries up
> > to three levels deep. Indications are that this issue is due to
> > excess data being stored on the stack, so replace stack-allocated
> > buffer data with dynamically allocated data in the case where we
> > are doing recursive processing of telemetry data structures into
> > json.
> > 
> > Bugzilla ID: 1177
> > Fixes: c933bb5177ca ("telemetry: support array values in data object")
> > Fixes: d2671e642a8e ("telemetry: support dict of dicts")
> > Cc: sta...@dpdk.org
> > 
> > Signed-off-by: Bruce Richardson <bruce.richard...@intel.com>
> > 
> > ---
> Acked-by: Tyler Retzlaff <roret...@linux.microsoft.com>
> 
> (one observation below)
> 
> > V2:
> >   set '\0' in newly malloc'ed buffer to ensure it always has valid
> >   string data.
> > ---
<snip>
> > @@ -286,6 +295,7 @@ output_json(const char *cmd, const struct rte_tel_data 
> > *d, int s)
> >                                                     v->name, temp);
> >                             if (!cont->keep)
> >                                     rte_tel_data_free(cont->data);
> > +                           free(temp);
> 
> not expressing a preference just noticing that when
> RTE_TEL_CONTAINER cases are the last case in the switch sometimes there
> is an explicit break; and sometimes not.
> 
I won't do a new patch revision just for that, but if I end up doing one
for other reasons I'll try and remember to make it more consistent.

thanks,
/Bruce

Reply via email to