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 Re: [dlvm][classlib] Re: hythr library problem... easy fix?
Date Tue, 05 Dec 2006 11:37:30 GMT
2006/12/4, Geir Magnusson Jr. <geir@pobox.com>:
>
>
> (Added categories, more inline)
>
> Alexey Petrenko wrote:
> > 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
> > time.
> >
> > This problem is active and known for a long period of time. Last
> > thread on this issue is here:
> > http://mail-archives.apache.org/mod_mbox/harmony-dev/200611.mbox/%3cc3755b3a0611130203r2ed7fadard81e1613257e2420@mail.gmail.com%3e
> >
> >
> > 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;
>
> These aren't semantically the same because you are letting the caller go
> in it's merry way as if all is well, when in fact the API contract says
> "we're dead if this isn't true"...
Yes, I understand this.
But! It works! :)
Class library tests are passed.
And I could not find corresponding assert in hythread_detach from class library.

SY, Alexey

Mime
View raw message