зеркало из https://github.com/github/ruby.git
Call rb_bug_without_die on CI
when GC.compact's SEGV handler is installed
This commit is contained in:
Родитель
82541df081
Коммит
4dbf6f1e51
12
error.c
12
error.c
|
@ -733,17 +733,25 @@ die(void)
|
|||
}
|
||||
|
||||
void
|
||||
rb_bug(const char *fmt, ...)
|
||||
rb_bug_without_die(const char *fmt, ...)
|
||||
{
|
||||
const char *file = NULL;
|
||||
int line = 0;
|
||||
|
||||
if (GET_EC()) {
|
||||
file = rb_source_location_cstr(&line);
|
||||
file = rb_source_location_cstr(&line);
|
||||
}
|
||||
|
||||
report_bug(file, line, fmt, NULL);
|
||||
}
|
||||
|
||||
void
|
||||
rb_bug(const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
va_start(args, fmt);
|
||||
rb_bug_without_die(fmt, args);
|
||||
va_end(args);
|
||||
die();
|
||||
}
|
||||
|
||||
|
|
7
gc.c
7
gc.c
|
@ -4597,7 +4597,12 @@ static struct sigaction old_sigsegv_handler;
|
|||
static void
|
||||
read_barrier_signal(int sig, siginfo_t * info, void * data)
|
||||
{
|
||||
read_barrier_handler((intptr_t)info->si_addr);
|
||||
extern int ruby_on_ci;
|
||||
if (ruby_on_ci) { // read_barrier_handler may crash. Report a backtrace first on CI.
|
||||
extern void rb_bug_without_die(const char *fmt, ...);
|
||||
rb_bug_without_die("died with read_barrier_signal installed");
|
||||
}
|
||||
read_barrier_handler((intptr_t)info->si_addr);
|
||||
}
|
||||
|
||||
static void uninstall_handlers(void)
|
||||
|
|
Загрузка…
Ссылка в новой задаче