1_stack_grow(3C)          Standard C Library Functions          _stack_grow(3C)
2
3
4

NAME

6       _stack_grow - express an intention to extend the stack
7

SYNOPSIS

9       #include <ucontext.h>
10
11       void *_stack_grow(void *addr);
12
13

DESCRIPTION

15       The  _stack_grow()  function  indicates to the system that the stack is
16       about to be extended to the address specified by addr. If extending the
17       stack  to  this address would violate the stack boundaries as retreived
18       by stack_getbounds(3C), a SIGSEGV is raised.
19
20
21       If the disposition of SIGSEGV is SIG_DFL, the process is terminated and
22       a  core  dump  is  generated.  If the application has installed its own
23       SIGSEGV handler to run on the alternate signal stack, the signal infor‐
24       mation  passed  to the handler will be such that a call to stack_viola‐
25       tion(3C) with these parameters returns 1.
26
27
28       The addr argument is a biased stack  pointer  value.  See  the  Solaris
29       64-bit Developer's Guide.
30
31
32       This  function  has no effect if the specified address, addr, is within
33       the bounds of the current stack.
34

RETURN VALUES

36       If the _stack_grow() function  succeeds and does  not  detect  a  stack
37       violation, it returns addr.
38

ERRORS

40       No errors are defined.
41

USAGE

43       The  _stack_grow()  function does not actually adjust the stack pointer
44       register. The caller is responsible for manipulating the stack  pointer
45       register once _stack_grow() returns.
46
47
48       The  _stack_grow() function is typically invoked by code created by the
49       compilation environment prior to executing code that modifies the stack
50       pointer. It can also be used by hand-written assembly routines to allo‐
51       cate stack-based storage safely.
52

ATTRIBUTES

54       See attributes(5) for descriptions of the following attributes:
55
56
57
58
59       ┌─────────────────────────────┬─────────────────────────────┐
60       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
61       ├─────────────────────────────┼─────────────────────────────┤
62       │Interface Stability          │Evolving                     │
63       ├─────────────────────────────┼─────────────────────────────┤
64       │MT-Level                     │Async-Signal-Safe            │
65       └─────────────────────────────┴─────────────────────────────┘
66

SEE ALSO

68       stack_getbounds(3C),      stack_inbounds(3C),      stack_violation(3C),
69       attributes(5)
70
71
72       Solaris 64-bit Developer's Guide
73
74
75
76SunOS 5.11                        18 Jul 2002                  _stack_grow(3C)
Impressum