• Tor Didriksen's avatar
    Bug#11761576 54082: HANDLE_SEGFAULT MAKES USE OF UNSAFE FUNCTIONS · b522a6ce
    Tor Didriksen authored
    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.
    b522a6ce
my_stacktrace.h 4.17 KB