fstack-security-check, GS

Determines whether the compiler generates code that detects some buffer overruns.

IDE Equivalent

Windows: Code Generation > Buffer Security Check

Linux: None

Mac OS X: None

Architectures

IA-32, Intel® 64 architectures

Syntax

Linux and Mac OS X:

-fstack-security-check

-fno-stack-security-check

Windows:

/GS

/GS-

Arguments

None

Default

-fno-stack-security-check
or /GS-

The compiler does not detect buffer overruns.

Description

This option determines whether the compiler generates code that detects some buffer overruns that overwrite the return address. This is a common technique for exploiting code that does not enforce buffer size restrictions.

The /GS option is supported with Microsoft Visual Studio .NET 2003* and Microsoft Visual Studio 2005*.

Alternate Options

Linux and Mac OS X: -f[no-]stack-protector

Windows: None


Submit feedback on this help topic

Copyright © 1996-2011, Intel Corporation. All rights reserved.