ruby-changes:63840
From: Nobuyoshi <ko1@a...>
Date: Wed, 2 Dec 2020 16:17:40 +0900 (JST)
Subject: [ruby-changes:63840] 30ded41fc3 (master): Loaded script is unset yet when crashed in the initialization phase
https://git.ruby-lang.org/ruby.git/commit/?id=30ded41fc3 From 30ded41fc3237f83470d0f6b64103f18bc92a78d Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Wed, 2 Dec 2020 16:16:27 +0900 Subject: Loaded script is unset yet when crashed in the initialization phase diff --git a/vm_dump.c b/vm_dump.c index 15b1b4a..6548a70 100644 --- a/vm_dump.c +++ b/vm_dump.c @@ -972,9 +972,11 @@ rb_vm_bugreport(const void *ctx) https://github.com/ruby/ruby/blob/trunk/vm_dump.c#L972 (((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); -- cgit v0.10.2 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/