--- a/hotspot/src/os/linux/vm/os_linux.cpp Thu Aug 13 23:35:32 2015 +0000
+++ b/hotspot/src/os/linux/vm/os_linux.cpp Fri Aug 14 04:21:37 2015 +0200
@@ -5785,9 +5785,11 @@
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
} else {
+ // must capture correct index before unlocking
+ int index = _cur_index;
status = pthread_mutex_unlock(_mutex);
assert(status == 0, "invariant");
- status = pthread_cond_signal(&_cond[_cur_index]);
+ status = pthread_cond_signal(&_cond[index]);
assert(status == 0, "invariant");
}
} else {