Intel® C++ Compiler
Support and discussions for creating C++ code that runs on platforms based on Intel® processors.
Announcements
Welcome to the Intel Community. If you get an answer you like, please mark it as an Accepted Solution to help others. Thank you!

Qipo and SAFESEH

iccuser
Beginner
217 Views
Using /Qipo breaks compilation with /SAFESEH or /Qsafeseh. If I use /Qip then everything compiles fine and the resulting executable has SEH table.
I don't see something relevant in the documentation so I come to the conclusion that this is somehow broken or it's by design like this. Can someone shed some light on this?

I'm using Intel Parallel Composer 12 update 4.

Thanks in advance.
0 Kudos
11 Replies
Om_S_Intel
Employee
217 Views
It would be nice if you can share a sample code so that we can investigate and narrow down the issue.
iccuser
Beginner
217 Views
I was able to reproduce this with this project.
Om_S_Intel
Employee
217 Views
It would be nice if you can attach the test case to this thread.
iccuser
Beginner
217 Views
The test case is in the link I posted. Anyway, attached is the source code.

Things to try:
* Run "build\Notepad2_icl12.sln" and you'll see that the executable will have the problem I described.
* Change /qipo to /qip and it will work as it should.
* Specify /SAFESEH in the linker, so that it's forced to generate SEH table, with /qipo and you'll get compilation errors.

Error 23 error LNK2026: module unsafe for SAFESEH image. C:\Users\user\Desktop\notepad2-mod\src\WPO.obj Notepad2
Error 24 error LNK1281: Unable to generate SAFESEH image. C:\Users\user\Desktop\notepad2-mod\bin\ICL12\Release_x86\Notepad2.exe Notepad2


All of the above apply to the "Release|Win32" config of course.

Note that Microsoft's compilers works fine.
Om_S_Intel
Employee
217 Views
This seems an issue with compiler. I have submitted a report to Intel Compiler development team on this. I will update the thread when I have more information.
iccuser
Beginner
217 Views
Thanks! It was baffling me for quite some time...

May I also suggest that the default location for the WPOObject file is set to IntDir? Because if it's not set the WPO object file gets generated every time even if nothing has changed and it can take a while for large projects.

One last thing I'd like to see in the documentation is something like this. It helps a lot to see which compiler switches are in effect with each optimization option enabled. If it's already there, sorry for that.
Om_S_Intel
Employee
217 Views
It would be nice if we have a smaller testcase.
iccuser
Beginner
217 Views
Sorry, not possible. Isn't that something the Intel developers should take care of when reviewing this issue? I don't see why I have to provide a smaller test case when this happens every time regardless of the code.
iccuser
Beginner
217 Views
I found this small program and decided to try ICC. The problem is present there, so here is your smaller testcase. Open FeetToMeters.sln and compile Release|Win32.

But like I said, the code doesn't matter, the problem always happens with /Qipo.
Om_S_Intel
Employee
217 Views
Thanks for helping with small testcase.
Om_S_Intel
Employee
217 Views
The issue is fixed in the latest Intel C++ Composer XE 2011.
Reply