Looking to prevent race conditions that can wreak havoc in software, Coverity is adding concurrency defect detection capabilities to its Coverity Prevent SQS (Software Quality System) static code analysis software for C, C++, and Java projects.
Being announced this week, the capability addresses one of the most difficult-to-find concurrency errors in multithreaded applications, Coverity said. Race conditions, in which multiple threads in a program attempt to access the same data set without appropriate locks, are automatically identified early in the development cycle.
The use of multicore hardware is resulting in development of multithreaded applications susceptible to race condition defects, said Coverity. The advent of multicore means developers have to change the way they deliver software to take advantage of those cores, said Ben Chelf, Coverity CTO.
"We've developed static analysis [software] that can analyze the code itself that uncovers these race conditions without requiring you to run the code," Chelf said.
Race conditions, according to Coverity, have been responsible for some of the most notorious software failures. In the Therac-25 radiation therapy machine, for example, race conditions were cited as a contributing factor to the death of five patients, the company said. Race defects can cause one thread to inadvertently overwrite data used by another thread, leading to information loss and data corruption.
Race conditions are likely to become more prevalent, said analyst Theresa Lanowitz, founder of voke.
"Not all software can just automatically run in a multicore environment," she said.
"This product is a preemptive move to solve very difficult problems before they impact a critical operation," she said.
"The ability to prevent race conditions in a multithreaded application is a significant advantage for any organization or consumer attempting to take advantage of multicore hardware," Lanowitz said.
The new release of Prevent SQS features an interface designed to help developers understand complex interleavings that exist within multithreaded applications, Coverity said. Advanced analysis capabilities analyze these interleavings to offer insight into complex code bases.
Other defects addressed by Prevent SQS include:
-- Deadlock, in which two or more threads wait for a lock in a circular chain manner such that the locks can never be acquired. This defect can cause a software system to halt because none of the threads can proceed along execution paths or exit.
-- Thread block, in which a thread calls a long-running operation while holding a lock, preventing the progress of other threads. This can cause a bottleneck that lowers application performance.
The price of Coverity Prevent SQS is based on project size.