[PATCH] Fix stringop-overflow warning in test-strncat.

Stefan Liebler stli@linux.ibm.com
Thu Mar 2 13:26:44 GMT 2023


On 02.03.23 11:23, Wilco Dijkstra wrote:
> Hi Stefan,
> 
>> In all werror cases, the call to strnlen (.., SIZE_MAX) is inlined.
>> Therefore this patch just marks the do_one_test function as noinline.
> 
> LGTM
> 
> Reviewed-by: Wilco Dijkstra  <Wilco.Dijkstra@arm.com>
> 
> Cheers,
> Wilco
> 
>  static void
> +__attribute__((noinline))
>  do_one_test (impl_t *impl, CHAR *dst, const CHAR *src, size_t n)
>  {
>    size_t k = STRLEN (dst);
> 
> OK

I've just committed the patch.

Thanks,
Stefan


More information about the Libc-alpha mailing list