Wednesday, November 2, 2022

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 [MS]


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.


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.


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: 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.


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 name

File version

File size























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

No comments:

Post a Comment

Search This Blog

August 9, 2016, cumulative update for SharePoint Server 2013 (KB3115450) - Microsoft Support [MS]

August 9, 2016, cumulative update for SharePoint Server 2013 (KB3115450) ...