MySQL 8.4.3
Source Code Documentation
check_stack.h File Reference

Go to the source code of this file.

Functions

bool check_stack_overrun (const THD *thd, long margin, unsigned char *dummy)
 Check stack for a overrun. More...
 
int initialize_stack_direction ()
 

Function Documentation

◆ check_stack_overrun()

bool check_stack_overrun ( const THD thd,
long  margin,
unsigned char *  buf 
)

Check stack for a overrun.

Parameters
thdThread handler.
marginMinimal acceptable unused space in the stack.
bufSee a note below.
Returns
false if success, true if error (reported).
Note
Note: The 'buf' parameter is necessary, and we must have code which uses it.
  • Some of the fix_fields functions have a "dummy" buffer large enough for the corresponding execution. (Thus we only have to check in fix_fields.)
  • Passing the buffer to check_stack_overrun() prevents the compiler from removing it.
  • For -flto builds, the dummy buffer may be optimized away, so we need to write something into it.

◆ initialize_stack_direction()

int initialize_stack_direction ( )