[llvm-bugs] [Bug 44267] New: Escaping symbols written to pre-escaped stack regions
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Dec 10 16:25:05 PST 2019
https://bugs.llvm.org/show_bug.cgi?id=44267
Bug ID: 44267
Summary: Escaping symbols written to pre-escaped stack regions
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Static Analyzer
Assignee: dcoughlin at apple.com
Reporter: xazax.hun at gmail.com
CC: dcoughlin at apple.com, llvm-bugs at lists.llvm.org
The problem in the title was partially solved in
https://github.com/llvm/llvm-project/commit/f3a28202ef58551db15818f8f51afd21e0f3e231
So we do not warn on:
void save_ptr(int **);
void delete_saved();
void store_to_escaped_region() {
int *p;
save_ptr(&p);
p = new int;
delete_saved();
} // no-warning
The reason why we decided to revert this change for now because we have not
found out a good way introduce this concept to the checkers. The pre-escape
happens in the analyzer core and the checker has no control over it. If the
checker is not interestd in a pre-escape it would need to do additional work on
each escape to check if the escaped symbol is originated from an
"uninteresting" pre-escaped memory region. In order to keep the checker API
simple we abandoned this solution for now.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20191211/1920161c/attachment.html>
More information about the llvm-bugs
mailing list