Merge
authordholmes
Fri, 14 Aug 2015 04:21:37 +0200
changeset 32354 d75120971606
parent 32353 90d7e2214fe5 (diff)
parent 32352 f631cef8a342 (current diff)
child 32356 f106b3a75fc9
child 32358 4cccd6794b0f
Merge
--- 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 {