summaryrefslogtreecommitdiff
path: root/error.c
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2020-11-26 20:08:20 -0800
committerTakashi Kokubun <takashikkbn@gmail.com>2020-11-26 20:09:57 -0800
commit4dbf6f1e515bd6a3b03ba9edccabccb780c3f789 (patch)
treed4d946ab3de0380997fb06da0039d2341d007f25 /error.c
parent82541df081393198dd9265ed12d6cc7cc32915a0 (diff)
Call rb_bug_without_die on CI
when GC.compact's SEGV handler is installed
Diffstat (limited to 'error.c')
-rw-r--r--error.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/error.c b/error.c
index 2e02fbf9b4..5383124492 100644
--- a/error.c
+++ b/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();
}