diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-15 05:38:07 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-04-15 05:38:07 +0000 |
commit | 584829aa814a1104205ab85cefcf245f8c118987 (patch) | |
tree | c966812ecde6bfc90b18530dbaa43ade185f435e /vm.c | |
parent | 073515a6499bc2ccc6a20891c4c82a5afb91b2a7 (diff) | |
download | ruby-584829aa814a1104205ab85cefcf245f8c118987.tar.gz |
* vm.c (vm_backtrace_each): get rid of use of malloc from signal
handler by using ruby_engine_name. [ruby-core:29497]
* vm_eval.c (print_backtrace): file may be nil when segfaulted in
very early stage.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27345 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm.c')
-rw-r--r-- | vm.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -732,8 +732,9 @@ vm_backtrace_each(rb_thread_t *th, int lev, rb_backtrace_iter_func *iter, void * } else if (RUBYVM_CFUNC_FRAME_P(cfp)) { ID id; + extern VALUE ruby_engine_name; - if (NIL_P(file)) file = rb_str_new_cstr("ruby"); + if (NIL_P(file)) file = ruby_engine_name; if (cfp->me->def) id = cfp->me->def->original_id; else |