Sun Studio 12: C++ User's Guide

A.2.114 -xcheck[=i]

SPARC: Compiling with -xcheck=stkovf adds a runtime check for stack overflow of the main thread in a singly-threaded program as well as slave-thread stacks in a multithreaded program. If a stack overflow is detected, a SIGSEGV is generated. If your application needs to handle a SIGSEGV caused by a stack overflow differently than it handles other address-space violations, see sigaltstack(2).

A.2.114.1 Values

i must be one of the following:

Table A–27 The -xcheck Values

Value 

Meaning  

%all 

Perform all checks. 

%none 

Perform no checks. 

stkovf

Turns on stack-overflow checking. 

no%stkovf

Turns off stack-overflow checking. 

Defaults

If you do not specify -xcheck, the compiler defaults to -xcheck=%none.

If you specify -xcheck without any arguments, the compiler defaults to -xcheck=%none.

The -xcheck option does not accumulate on the command line. The compiler sets the flag in accordance with the last occurrence of the command.