summaryrefslogtreecommitdiff
path: root/vm_dump.c
diff options
context:
space:
mode:
authornaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 02:58:54 +0000
committernaruse <naruse@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-12-11 02:58:54 +0000
commit0ab057280cee1b67b83bd4e9b1e9a8f5806c7bf1 (patch)
tree0249fb933c2777bf7f6881d11380a82f4ad0c087 /vm_dump.c
parent381b72da1202557b5670f39241c783658915a3da (diff)
Experimentally revert r38041
"vm_dump.c: no methods in segv handler" It may cause segv: http://fb.rubyci.org/~chkbuild/ruby-trunk/log/20121130T090301Z.diff.html.gz git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_dump.c')
-rw-r--r--vm_dump.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/vm_dump.c b/vm_dump.c
index c2fa33f..1c1a36e 100644
--- a/vm_dump.c
+++ b/vm_dump.c
@@ -675,26 +675,14 @@ rb_vm_bugreport(void)
if (vm) {
int i;
VALUE name;
- long len;
- const int max_name_length = 1024;
-# define LIMITED_NAME_LENGTH(s) \
- (((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, "* Loaded script: %s\n", StringValueCStr(name));
fprintf(stderr, "\n");
fprintf(stderr, "* Loaded features:\n\n");
for (i=0; i<RARRAY_LEN(vm->loaded_features); i++) {
name = RARRAY_PTR(vm->loaded_features)[i];
- if (RB_TYPE_P(name, T_STRING)) {
- fprintf(stderr, " %4d %.*s\n", i,
- LIMITED_NAME_LENGTH(name), RSTRING_PTR(name));
- }
- else {
- fprintf(stderr, " %4d #<%s:%p>\n", i,
- rb_class2name(CLASS_OF(name)), (void *)name);
- }
+ fprintf(stderr, " %4d %s\n", i, StringValueCStr(name));
}
fprintf(stderr, "\n");
}