[llvm-dev] How to ask MustAlias queries from DSA results

杨至轩(Zhixuan Yang) via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 16 18:53:50 PST 2016


Hello, everyone!


I'm writing an automatic memory leak fixing tool recently. For my task, I'm using the DSA (Data Structure Analysis) for alias analysis. In my task, when I detect a memory leak, I need to find a pointer (in C) 'must-alias' with the corresponding resource. 


In DSA, I think if two Value* point to the same DSNode, they 'may-alias'. If two Value* point to different DSNode, they 'not-alias'. However, is it possible to know whether two Value* 'must-alias'? 


I checked the AliasAnalysis interface before it was removed from DSA, the interface never returns MustAlias results. I guess it may not be possible to get 'MustAlias' results from DSA. Will it be possible to modify the DSA code so that every heap DSNode tracks all possible malloc() calls it comes from?


Thanks for your help.


Best regards, Zhixuan Yang
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20161217/8fe26204/attachment.html>


More information about the llvm-dev mailing list