Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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.

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


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

Affected source files

As this is a full wave release. Almost all binaries are affected by this release.

The following source files are affected by this release::

private\winceos\COREOS\core\corelibc\crtw32\startup\cexit.cpp
private\winceos\COREOS\core\corelibc\crtw32\startup\onexit.c

↑ Back to the top


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.

↑ Back to the top


References

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

↑ Back to the top


Keywords: kbNotAutohotfix, kbfix, kbqfe, kbpubtypekc, kbexpertiseinter, kbsurveynew, ATdownload, kb

↑ Back to the top

Article Info
Article ID : 4019373
Revision : 19
Created on : 7/25/2017
Published on : 8/1/2017
Exists online : False
Views : 170