GSFunctionOptimizeCheck BinScope
-
Mittwoch, 21. März 2012 10:38
Hi,
I got a method called Method() in a project proj.vcxproj throughing BinScope error GSFunctionOptimizeCheck failed in BinScope.
Optimation is enabled for the project.
Tried with /O1, /O2, and /Ox but the issue is not solved.
If i disable optimation its giving 41 methods name under same error type and 1 method if optimization is enabled.
Is there a problem with function or settings?
--Lakshman
- Verschoben Helen Zhao Freitag, 23. März 2012 09:23 (From:Visual C++ General)
Alle Antworten
-
Mittwoch, 21. März 2012 13:34
Read this page: http://msdn.microsoft.com/en-us/library/8dbf701c(VS.80).aspx
/GS is enabled by default, but even with that, there are configurations where it won't actually get applied.
The compiler does not provide security protection for vulnerable parameters in the following situations:
-
Functions that do not contain a buffer.
-
If optimizations (/O Options (Optimize Code)) are not enabled.
-
Functions with a variable argument list (...).
-
Functions marked with naked (C++).
-
Functions containing inline assembly code in the first statement.
-
If a parameter is used only in ways that are less likely to be exploitable in the event of a buffer overrun.
The easiest way to check is to go into the project's property pages. Expand Configuration Properties, C/C++, and then click onOptimization. If the first line-item in the configuration page has the value, Disabled (/Od) then change it to something else. The default Release Mode setting is Maximize Speed (/O2)
Delphine GARRO
- Als Antwort vorgeschlagen GARRO Delphine Montag, 26. März 2012 15:45
- Als Antwort markiert SDL TeamModerator Freitag, 30. März 2012 00:14
-
-
Freitag, 23. März 2012 09:22
Hi Siddireddy,
According to your description, I'd like to move this thread to "Microsoft Security Development Lifecycle (SDL) Forum" for efficient responses.
Thanks for your understanding and active participation in the MSDN Forum.
Have a nice day!Helen Zhao [MSFT]
MSDN Community Support | Feedback to us

