Search

Visual Studio 2012 RC の x86 版コンパイラで AVX を使ったコードが異常終了する。 by OKおじさん

Closed
as Fixed Help for as Fixed

1
1
Sign in
to vote
Type: Bug
ID: 752266
Opened: 7/4/2012 1:37:13 AM
Access Restriction: Public
0
Workaround(s)
0
User(s) can reproduce this bug
Visual Studio 2012 RC Professional の VS2012 x86 Native tools コマンドプロンプトを立ち上げ
添付するサンプルファイルを

cl /O2 /arch:AVX /EHsc sample.cpp

でコンパイルし

sample.exe

で実行すると異常終了する。100%異常終了するわけではなく、時々正常に動作する。
Details (expand)

Visual Studio/Team Foundation Server/.NET Frameworkツール製品名

Visual Studio 2012 RC

再現手順

Visual Studio 2012 RC Professional の VS2012 x86 Native tools コマンドプロンプトを立ち上げ
添付するサンプルファイルを

cl /O2 /arch:AVX /EHsc sample.cpp

でコンパイルし

sample.exe

で実行すると異常終了する。100%異常終了するわけではなく、時々正常に動作する。
/O2 スイッチを付けないと異常終了しない。
このサンプルは VS2010 Express Edition では問題なく動作する。
また、VS2012 x64 Native Tools コマンドプロンプトでコンパイルすると問題なく動作する。

製品言語

Japanese

オペレーティング システム

Windows 7

オペレーティング システム言語

Japanese

実際の結果

sample.exe は動作を停止しました

問題が発生したため、プログラムが正しく動作しなくなりま
した。プログラムは閉じられ、解決策がある場合は
Windows から通知されます。

期待した結果

2^( 1):     0.01us
2^( 2):     0.02us
2^( 3):     0.06us
2^( 4):     0.10us
2^( 5):     0.28us
2^( 6):     0.51us
2^( 7):     1.22us
2^( 8):     2.37us
2^( 9):     5.63us
2^(10):     14.41us
2^(11):     44.24us
2^(12):     91.45us
2^(13):     226.19us
2^(14):     539.70us
2^(15):    1329.37us
2^(16):    2808.46us
2^(17):    7768.99us
2^(18): 17844.41us
2^(19): 41953.10us
2^(20): 85463.01us
2^(21): 182053.40us
2^(22): 374999.53us
File Attachments
File Name Submitted By Submitted On File Size  
sample.cpp 7/4/2012 23 KB
Sign in to post a comment.
Posted by Real McCoy on 4/13/2013 at 4:39 AM
This issue resolved in VS Update 2. http://support.microsoft.com/kb/2797912
Posted by Microsoft on 3/13/2013 at 12:38 PM
This is bug in compiler's code generation on 32-byte alignment of local variables. We will fix this in the future release.

Thanks.
Charles Fu
Microsoft Visual Studio C++ team.
Posted by Microsoft on 7/19/2012 at 2:37 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 7/17/2012 at 12:10 AM
この度はフィードバックをお送りいただき、誠にありがとうございます。 現在、お送りいただきました報告内容に基づき問題を確認中ですので、しばらくお待ちください。 よろしくお願いいたします。

[Problem Description]:
When the Visual Studio 2012 RC VS2012 x86 Native Tools command prompt is launched, and the sample file to be attached is compiled via cl /O2 /arch:AVX /EHsc sample.cpp and executed as sample.exe, it gets abnormally terminated.

[Repro Steps]:
When the Visual Studio 2012 RC VS2012 x86 Native Tools command prompt is launched, and the sample file to be attached is compiled via cl /O2 /arch:AVX /EHsc sample.cpp and executed as sample.exe, it gets abnormally terminated.
It doesn’t get abnormally terminated 100% of the time, but it does time to time.
It doesn’t get abnormally terminated if the /O2 switch is not attached.
This sample functions normally with the VS2010 Express Edition.
The code functions normally when compiled in the VS2012 x64 Native Tools command prompt.

[Actual Results]:
sample.exe stopped the operation.
The program stopped functioning normally because an error occurred.
The program will be shut down and if there is a countermeasure, it’ll be notified by Windows.

[Expected Results]:
2^( 1): 0.01us
2^( 2): 0.02us
2^( 3): 0.06us
2^( 4): 0.10us
2^( 5): 0.28us
2^( 6): 0.51us
2^( 7): 1.22us
2^( 8): 2.37us
2^( 9): 5.63us
2^(10): 14.41us
2^(11): 44.24us
2^(12): 91.45us
2^(13): 226.19us
2^(14): 539.70us
2^(15): 1329.37us
2^(16): 2808.46us
2^(17): 7768.99us
2^(18): 17844.41us
2^(19): 41953.10us
2^(20): 85463.01us
2^(21): 182053.40us
2^(22): 374999.53us
Sign in to post a workaround.