Developer Guide and Reference

Contents

fstack-protector

Enables or disables stack overflow security checks for certain (or all) routines.

Syntax

Linux:
-fstack-protector
[
-keyword
]
-fno-stack-protector
[
-keyword
]
Windows:
None
Arguments
keyword
Possible values are:
strong
When option
-fstack-protector-strong
is specified, it enables stack overflow security checks for routines with any type of buffer.
all
When option
-fstack-protector-all
is specified, it enables stack overflow security checks for every routine.
If no
-keyword
is specified, option
-fstack-protector
enables stack overflow security checks for routines with a string buffer.
Default
-fno-stack-protector
,
-fno-stack-protector-strong
No stack overflow security checks are enabled for the relevant routines.
-fno-stack-protector-all
No stack overflow security checks are enabled for any routines.
Description
This option enables or disables stack overflow security checks for certain (or all) routines. A stack overflow occurs when a program stores more data in a variable on the execution stack than is allocated to the variable. Writing past the end of a string buffer or using an index for an array that is larger than the array bound could cause a stack overflow and security violations.
The
-fstack-protector
options are provided for compatibility with gcc. They use the gcc/glibc implementation when possible. If the gcc/glibc implementation is not available, they use the Intel implementation.
This content is specific to C++; it does not apply to
DPC++
.
For an Intel-specific version of this feature, see option
-fstack-security-check
.
IDE Equivalent
None
Alternate Options
None

Product and Performance Information

1

Performance varies by use, configuration and other factors. Learn more at www.Intel.com/PerformanceIndex.