Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Browse files

Fix overlocking bug caused by too high of rec count

The count is not how many times the lock is locked, but how many
ADDITONAL times it's been locked. So if it only locked the one time, the
count is 0. This code assumed it had to be at least 1, which causes
unlocks to hang.
  • Loading branch information...
commit 677ceca29285c5842b545e139e6435c8808220e1 1 parent 656b7d8
@evanphx evanphx authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  vm/objectmemory.cpp
2  vm/objectmemory.cpp
@@ -321,7 +321,7 @@ namespace rubinius {
initial_count = orig.f.aux_word & cAuxLockRecCountMask;
- ih->initialize_mutex(state->vm()->thread_id(), initial_count + 1);
+ ih->initialize_mutex(state->vm()->thread_id(), initial_count);
tmp.all_flags = ih;
tmp.f.meaning = eAuxWordInflated;

0 comments on commit 677ceca

Please sign in to comment.
Something went wrong with that request. Please try again.