Skip to content

Commit

Permalink
Decrement Metrics VM thread count before VM delete.
Browse files Browse the repository at this point in the history
This avoids an invalid read error when `vm == state->vm()`
  • Loading branch information
jemc committed Jan 27, 2015
1 parent 48e81ef commit e76fe30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vm/vm.cpp
Expand Up @@ -109,9 +109,9 @@ namespace rubinius {
vm->shared.remove_vm(vm);
vm->unlock(state->vm());

delete vm;

state->vm()->metrics()->system_metrics.vm_threads--;

delete vm;
}

void VM::initialize_as_root() {
Expand Down

0 comments on commit e76fe30

Please sign in to comment.