[PATCH] D152246: [clang][ThreadSafety] Analyze known function pointer values

Timm Bäder via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 10 01:35:49 PDT 2023


tbaeder added a comment.

> Maybe you can show an example how this might look like in practice?

AFAIU, the real-world case is more a C "class" struct with a couple of function pointers (a vtable), which might be different depending on circumstances.

So, the problem with this (type of) analysis is that we don't have a perfect view of the (global) program state, right? The CFG is per-function, and any other function (etc.) might change a function pointer. And we don't even know its initial value. Correct? The CFG-based anaylsis is just not enough to reliably diagnose this sort of problem.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152246/new/

https://reviews.llvm.org/D152246



More information about the cfe-commits mailing list