public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/2] provide simple detection of indeterminate pointers
@ 2021-11-01 22:15 Martin Sebor
  2021-11-01 22:17 ` [PATCH 1/2] add -Wuse-after-free Martin Sebor
                   ` (2 more replies)
  0 siblings, 3 replies; 34+ messages in thread
From: Martin Sebor @ 2021-11-01 22:15 UTC (permalink / raw)
  To: gcc-patches; +Cc: Martin Sebor

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

^ permalink raw reply	[flat|nested] 34+ messages in thread

end of thread, other threads:[~2022-03-29 18:00 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-01 22:15 [PATCH 0/2] provide simple detection of indeterminate pointers Martin Sebor
2021-11-01 22:17 ` [PATCH 1/2] add -Wuse-after-free Martin Sebor
2021-11-02  5:32   ` Eric Gallager
2021-11-02 17:09     ` Martin Sebor
2021-11-02 22:29   ` David Malcolm
2021-11-03  0:22     ` Martin Sebor
2021-11-23  1:32   ` Jeff Law
2021-11-23 21:16     ` Martin Sebor
2021-11-30 22:32       ` [PATCH v2 " Martin Sebor
2021-12-07  0:50         ` PING " Martin Sebor
2021-12-13 16:48           ` PING 2 " Martin Sebor
2022-01-04 18:01             ` PING 3 " Martin Sebor
2022-01-10 21:58               ` PING 4 " Martin Sebor
2022-01-11 22:40         ` Jason Merrill
2022-01-16  0:00           ` Martin Sebor
2022-03-26 20:35             ` Remove mysterious '-# Defining these options here in addition to common.opt is necessary' command-line option (was: [PATCH v2 1/2] add -Wuse-after-free) Thomas Schwinge
2022-03-29  9:24             ` options: Remove 'gcc/c-family/c.opt:Wuse-after-free' option definition record " Thomas Schwinge
2022-03-29 15:15               ` Martin Sebor
2022-03-29 18:00               ` Joseph Myers
2022-01-19 22:53           ` [PATCH v2 1/2] add -Wuse-after-free Jeff Law
2021-11-01 22:18 ` [PATCH 2/2] add -Wdangling-pointer [PR #63272] Martin Sebor
2021-11-02  7:40   ` Eric Gallager
2021-11-02 18:38     ` Martin Sebor
2021-11-30 22:55   ` [PATCH v2 " Martin Sebor
2021-12-07  0:51     ` PING " Martin Sebor
2021-12-13 16:50       ` PING 2 " Martin Sebor
2022-01-04 18:02         ` PING 3 " Martin Sebor
2022-01-10 21:51           ` PING 4 " Martin Sebor
2022-01-17 13:46             ` Stephan Bergmann
2022-01-17 19:14               ` Martin Sebor
2022-01-19 14:03                 ` Stephan Bergmann
2021-11-08 22:41 ` PING [PATCH 0/2] provide simple detection of indeterminate pointers Martin Sebor
2021-11-15 16:47   ` PING 2 " Martin Sebor
2021-11-22 16:41     ` PING 3 " Martin Sebor

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).