diff options
author | Sergei Golubchik <serg@mariadb.org> | 2017-05-11 19:48:42 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2017-05-15 22:23:10 +0200 |
commit | 52aa200919b1fd9357c05bcdfc66a42e51f242b3 (patch) | |
tree | 7c3c15b54110084a64e6f5f07e70de3016b1b6ae /include | |
parent | 602b5e4c498ad2e2d045adfa4fd1478ac437582a (diff) | |
download | mariadb-git-52aa200919b1fd9357c05bcdfc66a42e51f242b3.tar.gz |
MDEV-12420 max_recursive_iterations did not prevent a stack-overflow and segfault
post-review fixes
* move pcre-specific variable out of mysys
* don't use current_thd
* move a commonly used macro to my_sys.h
* remove new sysvar
Diffstat (limited to 'include')
-rw-r--r-- | include/my_sys.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/include/my_sys.h b/include/my_sys.h index 395d0956430..22ed7616f1c 100644 --- a/include/my_sys.h +++ b/include/my_sys.h @@ -227,9 +227,6 @@ extern void (*fatal_error_handler_hook)(uint my_err, const char *str, myf MyFlags); extern uint my_file_limit; extern ulonglong my_thread_stack_size; -#ifndef EMBEDDED_LIBRARY -extern ulonglong my_pcre_frame_size; -#endif extern int sf_leaking_memory; /* set to 1 to disable memleak detection */ extern void (*proc_info_hook)(void *, const PSI_stage_info *, PSI_stage_info *, @@ -909,6 +906,12 @@ extern ulonglong my_getcputime(void); #define hrtime_sec_part(X) ((ulong)((X).val % HRTIME_RESOLUTION)) #define my_time(X) hrtime_to_time(my_hrtime()) +#if STACK_DIRECTION < 0 +#define available_stack_size(CUR,END) (long) ((char*)(CUR) - (char*)(END)) +#else +#define available_stack_size(CUR,END) (long) ((char*)(END) - (char*)(CUR)) +#endif + #ifdef HAVE_SYS_MMAN_H #include <sys/mman.h> |