harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey Petrenko" <alexey.a.petre...@gmail.com>
Subject hythr library problem... easy fix?
Date Mon, 04 Dec 2006 11:37:10 GMT
hythr library problem in short...
hythr library from classlib can not work with DRL VM. hythr library
from DRL VM can not work with IBM VME (crash). Since hythr library is
placed in bin directory we can not use both Harmony VMs at the same

This problem is active and known for a long period of time. Last
thread on this issue is here:

During the weekend I had some free time and decided to look why J9 can
not work with hythr from DRL VM. The investigation shown that the
problem is in additional assert in hythread_detach method (comparing
to classlib implementation) and easy fix lets all the class library
tests to pass with J9 and hythr from DRL VM both on Windows and Linux.

Here is an easy fix:
--- vm/thread/src/thread_native_basic.c (revision 481203)
+++ vm/thread/src/thread_native_basic.c (working copy)
@@ -274,7 +274,9 @@
     // Acquire global TM lock to prevent concurrent acccess to thread list
     IDATA status;

-    assert(thread == tm_self_tls);
+    if (thread != tm_self_tls)
+        return;
     status = hythread_global_lock(NULL);
     assert (status == TM_ERROR_NONE);

The only problem with this fix (that's why it is still uncommited):
one of the VM tests fails in interpreter mode on Windows. So it needs
more investigation.

So the question is... If it's well known problem. And there was few
attempts to fix it... Did I miss something with this easy fix?

SY, Alexey

View raw message