SIGN UP MEMBER LOGIN:    
ARTICLE

CSLint: Deadlock Detector for C#

Posted by Konstantin Knizhnik Articles | Enterprise Development March 12, 2003
This is a deadlock detector for CSharp programs. It builds a lock graph for the application and searches loops in the graph.
Reader Level:
Download Files:
 

This is a deadlock detector for CSharp programs. It builds a lock graph for the application and searches loops in the graph.

CSLint is currently analyzing only monitors accessed through class fields (i.e lock(x) where x is component of some class) and that value of such fields can never be changed. 

To use it you should include in you PATH environment variable \cslint\bin directory. After it just run "CSLINT assembly-path".

This product is port of my Java verifier Jlint to CSharp. Only most interesting part of this verifier (deadlock detection algorithm) is currently ported. 

CSLint is using ILReader library implemented by Lutz Roeder for accessing the IL bytecode.

Unfortunately I didn't find a way to access debugging information (line numbers and file source path for the class). So CSLint is not able to precisely point place in the sources where deadlock happens. Right now it just reports class and method names and name of locked monitor. If somebody knows how to solve the problem, will  be glad to get your suggestions.

Login to add your contents and source code to this article
share this article :
post comment
 

How can I run CSLINT assembly-path ? Thanks

Posted by Mohammad Mahjoub Dec 14, 2007
Nevron Gauge for SharePoint
Become a Sponsor
PREMIUM SPONSORS
  • ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
    ceTE software specializes in components for dynamic PDF generation and manipulation. The DynamicPDF™ product line allows you to dynamically generate PDF documents, merge PDF documents and new content to existing PDF documents from within your applications. Visit DynamicPDF here
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor