Infer dereferenceability from malloc and friends
Hookup TLI when inferring object size from allocation calls. This allows the analysis to prove dereferenceability for known allocation functions (such as malloc/new/etc) in addition to those marked explicitly with the allocsize attribute. This is a follow up to 0129cd50 now that the bug fixed by e2c6621e is resolved. As noted in the test, this relies on being able to prove that there is no free between allocation and context (e.g. hoist location). At the moment, this is handled conservatively. I'm working strengthening out ability to reason about no-free regions separately. Differential Revision: https://reviews.llvm.org/D99737
Loading
Please sign in to comment