diff --git a/src/box/box.cc b/src/box/box.cc index 8629e4b0c1b00e88cbe4c45675128499380bfcf6..27a16f93d4acf4d7d5f07724d4f5ab166976c41a 100644 --- a/src/box/box.cc +++ b/src/box/box.cc @@ -2452,6 +2452,13 @@ box_feedback_report_crash(struct crash_info *cinfo) static void box_crash_callback(struct crash_info *cinfo) { + if (cinfo->signo == SIGBUS && + flightrec_is_mmapped_address(cinfo->siaddr)) { + fprintf(stderr, "error accessing flightrec file\n"); + fflush(stderr); + _exit(EXIT_FAILURE); + } + crash_report_stderr(cinfo); if (box_feedback_crash_enabled && diff --git a/src/box/flightrec.h b/src/box/flightrec.h index 259c9a74468cef8bc6925a6e2b8db583bfc21650..5ef44b2d85adcc04bb5d9ac63f6f66bbfcc82f2c 100644 --- a/src/box/flightrec.h +++ b/src/box/flightrec.h @@ -85,6 +85,17 @@ flightrec_write_response(struct obuf *buf, struct obuf_svp *svp) (void)svp; } +/** + * This function is called in SIGBUS handler to check whether accessed address + * belongs to flightrec file. + */ +static inline bool +flightrec_is_mmapped_address(void *addr) +{ + (void)addr; + return false; +} + #if defined(__cplusplus) } /* extern "C" */ #endif /* defined(__cplusplus) */