[PATCH] stack: occasional crash due to uninitialized variable

David Marchand david.marchand at redhat.com
Tue Feb 4 13:45:07 CET 2025


On Tue, Feb 4, 2025 at 2:24 AM Andre Muezerie
<andremue at linux.microsoft.com> wrote:
>
> Variable "success" was not being initialized and there was a code
> path where the last do/while loop in __rte_stack_lf_pop_elems
> looked at the value of this variable before it was set to any.
>
> Compiling with msvc resulted in stack_lf_autotest sometimes crashing.
>
> The fix is to initialize the variable. This same fix was applied to
> stack\rte_stack_lf_generic.h in the past but was missed here.
>
> Fixes: 7e6e609939a8 ("stack: add C11 atomic implementation")
> Cc: stable at dpdk.org
>
> Signed-off-by: Andre Muezerie <andremue at linux.microsoft.com>

Indeed, good catch.
Reviewed-by: David Marchand <david.marchand at redhat.com>


-- 
David Marchand



More information about the stable mailing list