Menu

The Lock Verifier checks for errors (or stops) in the file lock usages. The primary purpose of the Locks test is to ensure that the application uses critical sections properly.
Following is a list of verifier stops that may occur when running the lock verifier against a solution or project on different platforms:

Error message

Stop code

Thread that is exiting owns a critical section

0200

Unloading dll containing active critical section

0201

Freeing heap block containing an active critical section

0202

Double initialized or corrupted critical section

0203

Free memory containing an active critical section

0204

Corrupted critical section

0205

Invalid critical section owner thread

0206

Invalid critical section recursion count

0207

Deleting critical section with invalid lock count

0208

Critical section over released or corrupted

0209

Critical section not initialized

0210

Critical section is already initialized

0211

Freeing virtual memory containing an active critical section

0212

Unmapping memory region containing an active critical section

0213

Current thread does not own any critical sections

0214

Using Critical Section that is Private to Another DLL

0215

Additional information

Other details regarding lock checks:

  • Checks for the unload of a DLL that contains an active critical section. This leads to resource leaks.

  • Checks for a heap block free that contains an active critical section. This also leads to resource leaks.

  • Ensures that an application does not attempt to initialize a critical section more than once. This causes undefined behavior.

  • Checks for corruption of a critical section. The DebugInfo field of the critical section must not point to freed memory.

  • Checks for an owner thread ID which is invalid in the current context.

  • Ensures that the recursion count field of the critical section is not invalid in the current context.

  • Checks that the critical section was initialized before being deleted.

  • Ensures that the critical section is not released more times than the current thread acquired it.

  • Checks that the critical section has been initialized prior to being used.