PING [PATCH 0/2] provide simple detection of indeterminate pointers

Martin Sebor msebor@gmail.com
Mon Nov 8 22:41:11 GMT 2021


Ping for the two patches below:

-Wuse-after-free:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583044.html

and -Wdangling-pointer:
https://gcc.gnu.org/pipermail/gcc-patches/2021-November/583045.html

On 11/1/21 4:15 PM, Martin Sebor wrote:
> This two-patch series adds support for the detection of uses
> of pointers invalidated as a result of the lifetime of
> the objects they point to having ended: either explicitly,
> after a call to a dynamic deallocation function, or implicitly,
> by virtue of an object with automatic storage duration having
> gone out of scope.
> 
> To minimize false positives the initial logic is very simple
> (even simplistic): the code only checks uses in basic blocks
> dominated by the invalidating calls (either calls to
> deallocation functions or GCC's clobbers).
> 
> A more thorough checker is certainly possible and I'd say most
> desirable but will require a more sophisticated implementation
> and a better predicate analyzer than is available, and so will
> need to wait for GCC 13.
> 
> Martin



More information about the Gcc-patches mailing list