Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: llvmorg-21-init, llvmorg-19.1.7, llvmorg-19.1.6, llvmorg-19.1.5, llvmorg-19.1.4
# f4af60df 31-Oct-2024 Ella Ma <alansnape3058@gmail.com>

[analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (#85224)

Fixes #62985
Fixes #58820

When 3rd-party header files are included as

[analyzer] Fix false double free when including 3rd-party headers with overloaded delete operator as system headers (#85224)

Fixes #62985
Fixes #58820

When 3rd-party header files are included as system headers, their
overloaded `new` and `delete` operators are also considered as the std
ones. However, those overloaded operator functions will also be inlined.
This makes the same
symbolic memory marked as released twice: during `checkPreCall` of the
overloaded `delete` operator and when calling `::operator delete` after
inlining the overloaded operator function (if it has).

This patch attempts to fix this bug by adjusting the strategy of
verifying whether the callee is a standard `new` or `delete` operator in
the `isStandardNewDelete` function.

show more ...