This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Concurrency Defects

Defects related to multitasking code

Polyspace Results

Atomic load and store sequence not atomicVariable accessible between load and store operations
Atomic variable accessed twice in an expressionVariable can be modified between accesses
Blocking operation while holding lockTask performs lengthy operation while holding a lock
Data raceMultiple tasks perform unprotected nonatomic operations on shared variable
Data race including atomic operationsMultiple tasks perform unprotected operations on shared variable
Data race through standard library function callMultiple tasks make unprotected calls to thread-unsafe standard library function
DeadlockCall sequence to lock functions cause two tasks to block each other
Destruction of locked mutexTask tries to destroy a mutex in the locked state
Double lockLock function is called twice in a task without an intermediate call to unlock function
Double unlockUnlock function is called twice in a task without an intermediate call to lock function
Function that can spuriously fail not wrapped in loopLoop checks failure condition after possible spurious failure
Function that can spuriously wake up not wrapped in loopLoop checks wake-up condition after possible spurious wake-up
Missing lockUnlock function without lock function
Missing unlockLock function without unlock function
Signal call in multithreaded programProgram with multiple threads uses signal function
Thread-specific memory leakDynamically allocated thread-specific memory not freed before end of thread
Use of signal killing threadUncaught signal kills entire process instead of specific thread

Topics

Bug Finder Defect Groups

The Bug Finder defect checkers are classified into groups such as data flow, concurrency, numerical, and so on.

Analyze Multitasking Programs in Polyspace

Detect data races or deadlocks, or see a comprehensive analysis of shared variable usage.

Protections for Shared Variables in Multitasking Code

Protect shared variables using critical section, temporal exclusion, priorities or interrupt disabling.