51 #include <sys/types.h> 110 hpcrun_sigsegv_handler(
int sig, siginfo_t* siginfo,
void* context)
122 EMSG(
"Unwind segv abort enabled ... Aborting!!, context pc = %p", ctxt_pc);
126 EMSG(
"error: segv: context-pc=%p", ctxt_pc);
139 if (
memchk((
void *)it,
'\0',
sizeof(*it))) {
140 EMSG(
"error: segv handler: invalid jmpbuf");
161 TMSG(SEGV,
"NON unwind segv encountered");
170 int ret = monitor_sigaction(SIGBUS, &hpcrun_sigsegv_handler, 0,
NULL);
172 EMSG(
"Unable to install SIGBUS handler", __FILE__, __LINE__);
175 ret = monitor_sigaction(SIGSEGV, &hpcrun_sigsegv_handler, 0,
NULL);
177 EMSG(
"Unable to install SIGSEGV handler", __FILE__, __LINE__);
205 if (list_item ==
NULL)
struct segv_list_s segv_list_t
#define SLIST_HEAD_INITIALIZER(head)
int hpcrun_is_handling_sample(void)
hpcrun_sig_callback_t callback
static bool memchk(const char *buf, char v, size_t len)
void hpcrun_stats_num_samples_segv_inc(void)
sigjmp_buf_t bad_interval
static SLIST_HEAD(segv_list_head, segv_list_s)
sigjmp_buf_t * current_jmp_buf
void * hpcrun_malloc(size_t size)
#define SLIST_FOREACH(var, head, field)
void(* hpcrun_sig_callback_t)(void)
int hpcrun_segv_register_cb(hpcrun_sig_callback_t cb)
void hpcrun_bt_dump(frame_t *unwind, const char *tag)
siglongjmp_fcn * hpcrun_get_real_siglongjmp(void)
void monitor_real_abort(void)
void * hpcrun_context_pc(void *context)
#define SLIST_ENTRY(type)
thread_data_t *(* hpcrun_get_thread_data)(void)
#define SLIST_INSERT_HEAD(head, elm, field)