nkzxw / ontl

Automatically exported from code.google.com/p/ontl
0 stars 0 forks source link

TUT selftest fails with /safeseh #34

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Template Unit Test Framework selftest fails when built with /SAFESEH option.

This should not be caused by cxxrecord::catchguardhandler as it is in
SAFESEH table, however EH dispatcher don not call it.

Workaround: TUT works fine with /SAFESEH:NO option.

Original issue reported on code.google.com by ntl.supp...@gmail.com on 7 Nov 2009 at 4:18

GoogleCodeExporter commented 9 years ago
Note that selftest was passed at x64 mode.

Original comment by icestudent@gmail.com on 8 Nov 2009 at 10:03

GoogleCodeExporter commented 9 years ago
selftest fails only in debug mode with /SAFESEH option.

Original comment by icestudent@gmail.com on 12 Nov 2009 at 2:43

GoogleCodeExporter commented 9 years ago
selftest was failed with /safeseh and disabled /OPT:ICF.

Fixed in r700.

Original comment by icestudent@gmail.com on 12 Nov 2009 at 4:10

GoogleCodeExporter commented 9 years ago
For now it is clear this fails only with /OPT:NOICF and is caused by thunks 
generated
by the linker for cxxrecord::catchguardhandler(). 

Workaround is to use /OPT:ICF for release builds and /SAFESEH:NO for debug ones.

r700 does *disassembling* to get the handler address from the thunk. This is 
overhead
and, I believe, workarround but not fix.

Original comment by ntl.supp...@gmail.com on 12 Nov 2009 at 5:15