This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR 86572
- From: Bernd Edlinger <bernd dot edlinger at hotmail dot de>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>
- Date: Thu, 1 Nov 2018 15:15:22 +0000
- Subject: Re: [PATCH] Fix PR 86572
- References: <VI1PR0701MB2862DEE3CE9F931132E8ECDDE4F40@VI1PR0701MB2862.eurprd07.prod.outlook.com>
Ping...
For this patch here: https://gcc.gnu.org/ml/gcc-patches/2018-10/msg01336.html
Thanks
Bernd.
On 10/22/18 5:08 PM, Bernd Edlinger wrote:
> Hi!
>
> This makes c_strlen avoid an unsafe strlen folding of const arguments
> with non-const offset. Currently a negative out of bounds offset
> makes the strlen function return an extremely large number, and
> at the same time, prevents the VRP machinery, to determine the correct
> range if the strlen function in this case.
>
> Fixed by doing the whole computation in size_t and casting the
> result back to ssize_t.
>
>
> Bootstrapped and reg-tested on x86_64-pc-linux-gnu.
> Is it OK for trunk?
>
>
> Thanks
> Bernd.