mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-17 21:38:45 -04:00
Bug 315 - Handle sigcontext structures without eip.
git-svn-id: http://svn.zoneminder.com/svn/zm/trunk@1959 e3e1d417-86f3-4887-817a-d78f3d33393f
This commit is contained in:
@@ -174,6 +174,7 @@ AC_TYPE_SIGNAL
|
||||
|
||||
AC_CHECK_TYPES(siginfo_t,,,[#include <signal.h>])
|
||||
AC_CHECK_TYPES(struct sigcontext,,,[#include <signal.h>])
|
||||
AC_CHECK_MEMBERS([struct sigcontext.eip],,,[#include <signal.h>])
|
||||
AC_CHECK_TYPES(ucontext_t,,,[#include <signal.h>])
|
||||
|
||||
AC_CHECK_HEADERS(mysql/mysql.h,,AC_MSG_ERROR(zm requires mysql/mysql.h),)
|
||||
|
||||
@@ -85,13 +85,16 @@ RETSIGTYPE zm_die_handler( int signal )
|
||||
void *trace[16];
|
||||
int trace_size = 0;
|
||||
|
||||
#if HAVE_STRUCT_SIGCONTEXT
|
||||
#if HAVE_STRUCT_SIGCONTEXT_EIP
|
||||
Error(( "Signal address is %p, from %p\n", context.cr2, context.eip ));
|
||||
|
||||
trace_size = backtrace( trace, 16 );
|
||||
// overwrite sigaction with caller's address
|
||||
trace[1] = (void *)context.eip;
|
||||
#elif HAVE_STRUCT_SIGCONTEXT
|
||||
Error(( "Signal address is %p, no eip\n", context.cr2 ));
|
||||
|
||||
trace_size = backtrace( trace, 16 );
|
||||
#else // HAVE_STRUCT_SIGCONTEXT
|
||||
if ( info && context )
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user