[PATCH 1/5] infrastructure to detect out-of-bounds accesses to array parameters
Fri Aug 7 17:08:59 GMT 2020
On 7/28/20 7:16 PM, Martin Sebor wrote:
> Patch 1 adds the basic infrastructure to support array/VLA bounds
> in attribute access. It extends the access string specification
> to describe function parameters of array types (including VLAs),
> extends the attr_access class to parse the string and store
> the data in a form that's easy to work with, and implements
> checking of various kinds f mismatches between redeclarations.
> It doesn't actually enable anything new so no new tests are added.
Joseph's comments on patch 2 in the series prompted me to change
how the array (and VLA) function parameters are formatted: instead
of implementing it mostly outside the pretty printer (which, to do
completely correctly, would require reimplementing what the pretty
printer already does) I instead enhanced the pretty printer. That
let me simplify the formatting done in the helper. The attached
revision reflects this simplification (the only change from
the original is to attr_access::array_as_string).
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 58320 bytes
Desc: not available
More information about the Gcc-patches