-qstackprotect

Category

Object code control

@PROCESS

None.

Purpose

Provides protection against malicious code or programming errors that overwrite or corrupt the stack.

Syntax

Read syntax diagramSkip visual syntax diagram
        .-nostackprotect----------------------.   
>>- -q--+-stackprotect----=----+-all--------+-+----------------><
                               '-size--=--N-'     

Defaults

Parameters

all
all protects all procedures whether or not there are vulnerable objects. This option is not set by default.
size=N
size=N protects all procedures containing automatic objects greater or equal to N bytes in size. The default size is 8 when -qstackprotect is enabled.

Usage

-qstackprotect generates extra code to protect procedures with vulnerable objects against stack corruption. This option is disabled by default because it can cause performance degradation.

To generate code to protect all procedures with vulnerable objects:

xlf myprogram.f -qstackprotect=all

To generate code to protect procedures with objects of certain bytes:

xlf myprogram.f -qstackprotect=size=8