vm_trace.c: uninitialized state

* vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
  when no events is excuted.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36861 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-08-31 05:02:47 +00:00
Родитель 667a6a8516
Коммит 4faf219853
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,8 @@
Fri Aug 31 14:02:44 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* vm_trace.c (rb_threadptr_exec_event_hooks): fix uninitialized state
when no events is excuted.
Thu Aug 30 18:21:51 2012 Tanaka Akira <akr@fsij.org>
* io.c (rb_io_close): call rb_last_status_clear.

Просмотреть файл

@ -320,7 +320,7 @@ rb_threadptr_exec_event_hooks(rb_thread_t *th, rb_event_flag_t event, VALUE self
{
if (th->trace_running == 0 &&
self != rb_mRubyVMFrozenCore /* skip special methods. TODO: remove it. */) {
int state;
int state = 0;
int outer_state = th->state;
th->state = 0;