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.



include/my_stacktrace.h:
  Add safe versions of itoa() write() and snprintf().
libmysqld/CMakeLists.txt:
  Move signal handler to separate file.
mysys/stacktrace.c:
  Remove unsafe function calls.
sql/CMakeLists.txt:
  Move signal handler to separate file.
sql/mysqld.cc:
  Move signal handler to separate file.
sql/set_var.h:
  Add missing #include dependency.
sql/sys_vars.cc:
  Cleanup .h and .cc files.
sql/sys_vars.h:
  Cleanup .h and .cc files.
This commit is contained in:
Tor Didriksen 2011-12-02 14:16:48 +01:00
commit b522a6ce78
9 changed files with 435 additions and 304 deletions

View file

@ -34,6 +34,7 @@ class Item_func_set_user_var;
// This include needs to be here since item.h requires enum_var_type :-P
#include "item.h" /* Item */
#include "sql_class.h" /* THD */
extern TYPELIB bool_typelib;