소스 검색

[Minor] Use a more standard way to initialize libunwind

tags/3.7.1
Vsevolod Stakhov 9 달 전
부모
커밋
89f2c5d327
No account linked to committer's email address
1개의 변경된 파일7개의 추가작업 그리고 5개의 파일을 삭제
  1. 7
    5
      src/libserver/worker_util.c

+ 7
- 5
src/libserver/worker_util.c 파일 보기



#ifdef WITH_LIBUNWIND #ifdef WITH_LIBUNWIND
static void static void
rspamd_print_crash(ucontext_t *uap)
rspamd_print_crash(ucontext_t *_uap)
{ {
unw_cursor_t cursor; unw_cursor_t cursor;
unw_word_t ip, off;
unw_context_t uc;
unw_word_t ip, off, sp;
guint level; guint level;
gint ret; gint ret;


if ((ret = unw_init_local(&cursor, uap)) != 0) {
unw_getcontext(&uc);
if ((ret = unw_init_local(&cursor, &uc)) != 0) {
msg_err("unw_init_local: %d", ret); msg_err("unw_init_local: %d", ret);


return; return;


if (ret == 0) { if (ret == 0) {
msg_err("%d: 0x%xl: %s()+0x%xl", msg_err("%d: 0x%xl: %s()+0x%xl",
level, (unsigned long)ip, name, (unsigned long)off);
level, (unsigned long) ip, name, (unsigned long) off);
} }
else { else {
msg_err("%d: %0x%xl: <unknown>", level, (unsigned long)ip);
msg_err("%d: %0x%xl: <unknown>", level, (unsigned long) ip);
} }


level++; level++;

Loading…
취소
저장