LNK9038 SAFESEH warning,

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

Iam linking my C++ project with some external libraries and getting the
following error:

someLib.lib(omeObj.obj) : LNK9038: module unsafe for SAFESEH image.
I do not have exception handling turned on in my main project (no /GX /Eh
options).

What is wrong?

Matej
 
Matej Trampus said:
Iam linking my C++ project with some external libraries and getting the
following error:

someLib.lib(omeObj.obj) : LNK9038: module unsafe for SAFESEH image.
I do not have exception handling turned on in my main project (no /GX /Eh
options).
/SAFESEH generates a table of exception handlers for structured exception
handling in the image. SEH is a different from C++ exception handling
(the latter is built on top of SEH). SEH is also about things like processor
exceptions such as access violations etc.

The table is suppossed to be minimize attacks hijacking the exception
handler list. The OS (IIRC it's a W2K3+ feature) will no longer dispatch
to a handler which is not listed in the image's SAFESEH table.

I don't think there's a lot you can do short of removing /SAFESEH from
the linker command line.

-hg
 
Back
Top