FIX: Exception when multiple threads call the C run-time "atexit" function at the same time in Windows Embedded Compact 7

Gäller för: Windows Embedded Compact 7

Introduction


This article describes an issue in which an exception occurs when multiple threads call the C run-time "atexit" function at the same time in Windows Embedded Compact 7. An update is available to resolve this issue. Before you install this update, all previously issued updates for this product must be installed.

Symptoms


When multiple threads call the C run-time atexit function at the same time in Windows Embedded Compact 7, an exception may occur. The exception occurs when the code that calls the atexit function is not serialized or when the atexit function is inserted by the compiler.

Cause


The issue occurs because the C-Run time atexit function is not thread-safe. Therefore, the memory table that the function uses is corrupted.

Resolution


Software update information

A supported software update is now available from Microsoft as Windows Embedded Compact 7 Monthly Update (June 2017).

Note This Windows Embedded Compact 7 Monthly Update is available for download from the following Microsoft Download Center website:

Windows Embedded Compact 7 Updates

Prerequisites

This update is supported only if all previously issued updates for this product have also been installed.

Restart requirement

After you apply this update, you must perform a clean build of the whole platform. To do this, use one of the following methods:

  • On the Build menu, click Clean Solution, and then click Build Solution.
  • On the Build menu, click Rebuild Solution.

You do not have to restart the computer after you apply this software update.

Update replacement information

This update does not replace any other updates.

File information

More information


In a multithread environment, the function tables of atexit may be corrupted by another atexit call because of non-thread safety. This could lead to memory corruption and exceptions. The atexit function is being used to register a routine that will be executed when the program exits or a .dll unloads. The flaw in thread safety could lead to alteration of this exit routine and corruption of the exit function tables.

References


Learn about the terminology that Microsoft uses to describe software updates.