Guardian Procedure Calls Reference Manual (G06.25+)

Guardian Procedure Calls (R)
Guardian Procedure Calls Reference Manual522629-013
13-46
REFPARAM_BOUNDSCHECK_ Procedure
start-address input
STRING .EXT:ref:*
identifies the start of the data area to be bounds checked.
When REFPARAM_BOUNDSCHECK_ is called from a native process,
start-
address cannot be a relative segment 1 or 2 address. Neither can it be an
absolute address unless
flags.<14> is set to allow this.
When REFPARAM_BOUNDSCHECK_ is called from a TNS process,
start-
address can be an absolute address that points to the TNS stack.
area-length input
INT(32):value
is the length of the area to be checked. It is a 31-bit value. On a native processor,
the area must not span separately allocated logical areas even if the areas are
contiguous in virtual memory.
If
area-length is zero (0D), start-address is not checked and
REFPARAM_BOUNDSCHECK_ returns without error.
framestart input
EXTADDR:value
excludes the stack area of the calling procedure from the area that
REFPARAM_BOUNDSCHECK_ accepts as valid.
If
framestart is zero, REFPARAM_BOUNDSCHECK_ verifies only that the
specified memory area is valid. It makes no attempt to verify that the specified
memory area does not overlap the part of the stack used by the calling process.
If
framestart is nonzero, it specifies one edge of a region to be excluded from
the valid area. For a TNS process, the excluded area begins at the address in
framestart and extends 600 bytes past the L-register setting of the procedure
that calls REFPARAM_BOUNDSCHECK_. For a native process, the excluded
area begins at the start of the stack area and extends to (but does not include) the
address specified by
framestart. Stack-frame overlap detection 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.