diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-02 16:16:27 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2020-12-02 16:16:48 +0900 |
commit | 30ded41fc3237f83470d0f6b64103f18bc92a78d (patch) | |
tree | 934d6e9caca3601c39e9d43d981f96c9c605697c /vm_dump.c | |
parent | 98c9120cc00ba691b4abcc13a49a30fa54638535 (diff) |
Loaded script is unset yet when crashed in the initialization phase
Diffstat (limited to 'vm_dump.c')
-rw-r--r-- | vm_dump.c | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -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); |