swscanf_s + /Qip Incorrect compilation results

swscanf_s + /Qip Incorrect compilation results

Ritratto di Underground78

Hello,

We have some issues with the the Intel C++ compiler (version 13.1.0.149 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!

Regards,
Underground78

AllegatoDimensione
Scarica test.cpp370 byte
5 post / 0 new
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Jennifer J. (Intel)

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>test

5025678

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

C:\test>test

C:\test>

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

Jennifer

Ritratto di iccuser

This wasn't fixed in update 3?

Ritratto di Sergey Kostrov

>>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
Main.cpp:
Turbo Incremental Link 5.00 Copyright (c) 1997, 2000 Borland
Main.cpp - 0 error(s), 0 warning(s)

..\Test>Main.exe
5025678

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

Ritratto di Jennifer J. (Intel)

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

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

Jennifer

Accedere per lasciare un commento.