summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-02 16:16:27 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2020-12-02 16:16:48 +0900
commit30ded41fc3237f83470d0f6b64103f18bc92a78d (patch)
tree934d6e9caca3601c39e9d43d981f96c9c605697c /vm_dump.c
parent98c9120cc00ba691b4abcc13a49a30fa54638535 (diff)
Loaded script is unset yet when crashed in the initialization phase
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/vm_dump.c b/vm_dump.c
index 15b1b4a4a3..6548a705dc 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -972,9 +972,11 @@ rb_vm_bugreport(const void *ctx)
(((len = RSTRING_LEN(s)) > max_name_length) ? max_name_length : (int)len)
name = vm->progname;
- fprintf(stderr, "* Loaded script: %.*s\n",
- LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
- fprintf(stderr, "\n");
+ if (name) {
+ fprintf(stderr, "* Loaded script: %.*s\n",
+ LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
+ fprintf(stderr, "\n");
+ }
fprintf(stderr, "* Loaded features:\n\n");
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
name = RARRAY_AREF(vm->loaded_features, i);