From d9b1886f920fc3e715766b18fb0be2bce78818ed Mon Sep 17 00:00:00 2001 From: Tor Didriksen Date: Fri, 2 Dec 2011 14:16:48 +0100 Subject: Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS handle_segfault is the signal handler code of mysqld. however, it makes calls to potentially unsafe functions localtime_r, fprintf, fflush. --- sql/signal_handler.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/signal_handler.cc') diff --git a/sql/signal_handler.cc b/sql/signal_handler.cc index 54b456ec2c4..27fcf741e2a 100644 --- a/sql/signal_handler.cc +++ b/sql/signal_handler.cc @@ -16,7 +16,7 @@ #include "my_global.h" #include -#include "mysql_priv.h" +#include "sys_vars.h" #include "my_stacktrace.h" #ifdef __WIN__ @@ -111,7 +111,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) (ulong) max_used_connections); my_safe_printf_stderr("max_threads=%u\n", - (uint) thread_scheduler.max_threads); + (uint) thread_scheduler->max_threads); my_safe_printf_stderr("thread_count=%u\n", (uint) thread_count); @@ -124,7 +124,7 @@ extern "C" sig_handler handle_fatal_signal(int sig) ((ulong) dflt_key_cache->key_cache_mem_size + (global_system_variables.read_buff_size + global_system_variables.sortbuff_size) * - thread_scheduler.max_threads + + thread_scheduler->max_threads + max_connections * sizeof(THD)) / 1024); my_safe_printf_stderr("%s", -- cgit v1.2.1