On 9/9/18 3:57 AM, Bernd Edlinger wrote:
> On 09/09/18 01:47, Jeff Law wrote:
>> On 9/8/18 3:47 PM, Bernd Edlinger wrote:
>>> Hi,
>>>
>>>
-fold_builtin_strlen (location_t loc, tree type, tree arg)
+fold_builtin_strlen (location_t loc, tree fndecl, tree type, tree arg)
{
if
On 09/09/18 01:47, Jeff Law wrote:
> On 9/8/18 3:47 PM, Bernd Edlinger wrote:
>> Hi,
>>
>>
>>> -fold_builtin_strlen (location_t loc, tree type, tree arg)
>>> +fold_builtin_strlen (location_t loc, tree fndecl, tree type, tree arg)
>>> {
>>> if (!validate_arg (arg, POINTER_TYPE))
>>> retu
On 9/8/18 3:47 PM, Bernd Edlinger wrote:
> Hi,
>
>
>> -fold_builtin_strlen (location_t loc, tree type, tree arg)
>> +fold_builtin_strlen (location_t loc, tree fndecl, tree type, tree arg)
>> {
>>if (!validate_arg (arg, POINTER_TYPE))
>> return NULL_TREE;
>>else
>> {
>> - t
Hi,
> -fold_builtin_strlen (location_t loc, tree type, tree arg)
> +fold_builtin_strlen (location_t loc, tree fndecl, tree type, tree arg)
> {
>if (!validate_arg (arg, POINTER_TYPE))
> return NULL_TREE;
>else
> {
> - tree len = c_strlen (arg, 0);
> -
> + tree nonstr =
On 08/30/2018 04:15 PM, Jeff Law wrote:
On 08/13/2018 09:21 PM, Martin Sebor wrote:
[PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552)
The attached changes implement the detection of past-the-end reads
by strlen due to unterminated arguments.
gcc-86552-2.diff
PR tree
On 08/13/2018 09:21 PM, Martin Sebor wrote:
> [PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552)
>
> The attached changes implement the detection of past-the-end reads
> by strlen due to unterminated arguments.
>
> gcc-86552-2.diff
>
>
>
[PATCH 2/6] detect unterminated const arrays in strlen calls (PR 86552)
The attached changes implement the detection of past-the-end reads
by strlen due to unterminated arguments.
PR tree-optimization/86552 - missing warning for reading past the end
gcc/ChangeLog:
* builtins.c