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
6 Months Free & No Setup Fees ASP.NET Hosting!
Become a Sponsor
PREMIUM SPONSORS
  • The leading .NET charting control now features PDF, Flash and Silverlight export, visualization of large datasets and more. Deliver true charting functionality to your BI, Scorecard, Presentation or Scientific apps. Download evaluation now.
    Get 2 Months Free of ASP.NET Hosting for Only $4.95/month! Receive FREE MS SQL and MySQL Databases Including ASP.NET 4/3.5, MVC 3.0, Silverlight 4, Windows 2008/IIS 7.0 Plus FREE IIS 7 Modules. Host UNLIMITED ASP.NET Web Sites - Click Here!
Team Foundation Server Hosting
Become a Sponsor