swscanf_s + /Qip Incorrect compilation results

swscanf_s + /Qip Incorrect compilation results


We have some issues with the the Intel C++ compiler (version Build 20130118) that seem related to the swscanf_s function and the /Qip option. Depending of the code used, either the program crashes completely or gives incorrect results when /Qip is used.

I have simplified the code and the command line used a lot (the code is originally from Media Player Classic HomeCinema) to make reproducing the issue easy. The test.cpp file is the simplest example I could come up with, it can be compiled with icl /Qip /o test.exe test.cpp to reproduce the issue.

If you need any other information let me know!


Descargar test.cpp370 bytes
publicaciones de 5 / 0 nuevos
Último envío
Para obtener más información sobre las optimizaciones del compilador, consulte el aviso sobre la optimización.

Thank you very much for reporting this issue with a small testcase. I can duplicate the problem and will submit a bug report to the compiler team.

C:\test>icl /O1 /Qip test.cpp

C:\test>icl /O2 /Qip test.cpp

There are several workarounds: /O1 or /O2 /Ob2.

This wasn't fixed in update 3?

>>This wasn't fixed in update 3?

I don't know and I've put a hold on Update 3 ( sorry, too many issues and problems ). I did a verification with a legacy C++ compiler and here are results:

..\Test>bcc32.exe Main.cpp
Borland C++ 5.5.1 for Win32 Copyright (c) 1993, 2000 Borland
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Main.cpp - 0 error(s), 0 warning(s)


Also, a test application compiled with Intel(R) C++ Compiler XE for applications running on IA-32, Version Build 20120928 fails as well.

Update to this issue. it is fixed in update 5.

you can download the update 5 from the Intel Registration Center.


Inicie sesión para dejar un comentario.