On Tue, 6 Feb 2024, Jakub Jelinek wrote:
> Hi!
>
> The UB on the following testcase isn't diagnosed by -fsanitize=address,
> because we see that the array has a single element and optimize the
> strlen to 0. I think it is fine to assume e.g. for range purposes the
> lower bound for the strlen
Hi!
The UB on the following testcase isn't diagnosed by -fsanitize=address,
because we see that the array has a single element and optimize the
strlen to 0. I think it is fine to assume e.g. for range purposes the
lower bound for the strlen as long as we don't try to optimize
strlen (str)
where