Guardian Procedure Calls Reference Manual
is possible only for procedures running on the default stack of the process; it is not performed
if framestart designates an address on a user thread stack.
In pTAL, the correct value to pass in framestart is obtained using the $PARAMSTART function.
In TAL, you use the $XADR function. A set of DEFINEs are available to mask the differences
between pTAL and TAL. See Considerations for details.
flags
input
INT:value
specifies options. The bits indicate:
must be zero.<0:13>
specifies that absolute addressing is not allowed for native processes.= 0<14>
allows absolute addressing even if REFPARAM_BOUNDSCHECK_ is called from a native
process. No checking is performed and REFPARAM_BOUNDSCHECK_ returns without error.
= 1
checks the area for read/write access.= 0<15>
checks the area for read-only access.= 1
Returned Value
INT
One of these values:
No error. The procedure successfully executed; the specified memory area is in bounds. For a discussion of
what it means to be in bounds, see Considerations.
0
The specified memory area is out of bounds. Accessing the area might cause an addressing trap or
system-generated nondeferrable signal
1
The address is in a read-only area and the check was made for read/write access. The effect of attempting
to write to the area depends on whether your process is a native process or a TNS process: for a native
2
process, the system might deliver a nondeferrable signal to the process; for a TNS process, the write operation
might not take effect.
The address area is in bounds in an extensible segment, but disk space for the extensible segment could not
be allocated. If you try to write to this area, the effect depends on whether your process is a TNS process or
3
a native process: a TNS process might terminate with a “no memory available” trap (trap 12); a native process
might receive a SIGNOMEM signal.
An absolute address was supplied in start-address for a native process but flags.<14> was not set to
allow an absolute address.
5
Considerations
• To pass the tests performed by REFPARAM_BOUNDSCHECK_, a correct reference parameter
must meet this criteria:
◦ The reference address must start within a range that is mapped into the user's logical
address space.
◦ The entire referenced area specified by start-address and area-length is within
the same logical addressing space as the start-address. That is, it must be entirely
within one of these: the TNS data stack, the main stack, or a single selectable extended
data segment. In the case of TNS code segments, the address must be within a single
code space if the TNS code segment spans multiple code spaces.
◦ The reference parameter must be within an unprotected logical addressing space. For
TNS processors, this addressing space is either the TNS data stack, an unprivileged
selectable extended data segment, or certain relative code segments. On native processors,
1232 Guardian Procedure Calls (R)