llvm-project
5bb7ba62 - [analyzer] Detect use-after-free for field address (e.g., &ptr->field) (#152462)

Commit
31 days ago
[analyzer] Detect use-after-free for field address (e.g., &ptr->field) (#152462) This patch improves MallocChecker to detect use-after-free bugs when a freed structure's field is passed by address (e.g., `&ptr->field`). Previously, MallocChecker would miss such cases, as it only checked the top-level symbol of argument values. This patch analyzes the base region of arguments and extracts the symbolic region (if any), allowing UAF detection even for field address expressions. Fixes #152446
Author
Parents
Loading