My Other Me
My Other Me

Reputation: 5117

Are there any static code analysis tools that look at potential execution paths that might lead to a deadlock(C#)

Is there any tool or plugin for visual studio (2008) that will go over a C# class and look for possible scenarios that could lead to potential deadlocks? Anything that would seek out every lock (xxx) {} block and then seek other methods that call the method leading to that critical section and forms a list of methods that could lead to a conflict.

Upvotes: 2

Views: 522

Answers (3)

plaugg
plaugg

Reputation: 440

What about CHESS (http://msdn.microsoft.com/en-us/devlabs/cc950526.aspx) from Microsoft devlabs? I have not yet played with it, but it looks as it could be a help for your problem.

Upvotes: 1

Sam Holder
Sam Holder

Reputation: 32954

Typemock make a product called Typemock Racer, but its not free and I don't believe it does static analysis. I think it does analyse your code, find the conditions which will cause a deadlock and give you a test which will reproduce those conditions so you can debug and fix it and have a test to ensure it doesn't come back again.

Upvotes: 0

Rob Goodwin
Rob Goodwin

Reputation: 2777

I have use Coverity at work for Java that did a pretty good job at detecting potential deadlock conditions. It is supposed to support C# as well, but have not run it against any code to verify its effectiveness.

Upvotes: 1

Related Questions