[llvm-dev] Want to write a static code analysis tool to locate all possible dangling pointer in c++ code

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[llvm-dev] Want to write a static code analysis tool to locate all possible dangling pointer in c++ code

George Karpenkov via llvm-dev
Hi All,
I am new to LLVM and trying to learn it. Actually I want to solve dangling pointer problem in a very big and complex C++ project by static code analysis. My idea is to find all possible pointers which may point to a particular type of object within the data structure in the code. Application should be smart enough to understand normal C++ Up-casting or down-casting by dynamic-cast etc.

It seems LLVM's "Alias Analysis Infrastructure" and CallGraphPass may be useful to do the above kind of job at least to some extent. But unfortunately I am not familiar how to write such a tool. If you think it is possible to implement my idea using LLVM then please let me know how I can write such a tool. Any kind of help or example is welcome.

Thanks
Subrata

_______________________________________________
LLVM Developers mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
Loading...