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.

An access violation error occurs when you run a Visual C++ 2010 application that is built for an x64 platform if an optimization compiler option is enabled


View products that this article applies to.

Symptoms

Consider the following scenario:
  • You create a Microsoft Visual C++ 2010 project. 
  • You use a function that returns a local variable that is larger than 64 bytes. 
  • You enable an optimization compiler option for the project. For example, you enable the Maximize Speed (/O2) optimization compiler option.
  • You build the project for the x64 platform by using Microsoft Visual Studio 2010, and then you try to run the built application.
In this scenario, an access violation error occurs, and the application crashes.

↑ Back to the top


Cause

This issue occurs because the compiler-generated code calls an instruction that requires a data buffer aligned in 16-byte blocks. For example, the code calls a MOVAPD or MOVDQA instruction. However, the data buffer may be unaligned. Therefore, an access violation occurs when the application uses this instruction to try to write an optimized local variable into an unaligned data buffer.

↑ Back to the top


Resolution

Hotfix information

A supported hotfix is now available from Microsoft. However, it is intended to correct only the problem that is described in this article. Apply it only to systems that are experiencing this specific problem. This hotfix may receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next software update that contains this hotfix.

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

To apply this hotfix, you must have Microsoft Visual Studio 2010 installed.

Restart requirement

You do not have to restart the computer after you install this hotfix.

Hotfix replacement information

This hotfix does not replace any other hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) that are listed in the following table. The dates and times for these files are listed in Coordinated Universal Time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time item in Control Panel.
For all supported versions of Team Foundation Server 2008
File nameFile versionFile sizeDateTimePlatform
C2.dll16.0.30319.4132,508,09601-Jan-201102:33x86
C2.dll16.0.30319.4132,627,39201-Jan-201102:33x86
C2.dll16.0.30319.4132,975,55201-Jan-201102:33x64

↑ Back to the top


Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

↑ Back to the top


Keywords: kbhotfixdev, kbfix, kbqfe, kbhotfixserver, kbexpertiseadvanced, kbsurveynew, kb

↑ Back to the top

Article Info
Article ID : 2485545
Revision : 1
Created on : 1/7/2017
Published on : 6/21/2014
Exists online : False
Views : 274