[vmkit-commits] Add class lock and condition variable to AOT compiled classes

Allan Tong actong88 at gmail.com
Wed Sep 22 18:09:18 PDT 2010


Revision 111399 breaks AOT compiled code.  The thin lock was removed
from the LLVM class structure, but the new lock and condition variable
were not added.  When loading the AOT compiled class, the lock and
condition members would access memory outside of the object.  Trying
to run a hello world with a precompiled libvmjc.so resulted in an
assertion in the pthread library since the mutex contained garbage
data:

j3: tpp.c:63: __pthread_tpp_change_priority: Assertion `new_prio == -1
|| (new_prio >= __sched_fifo_min_prio && new_prio <=
__sched_fifo_max_prio)' failed.

The attached patch should fix the issue.  I modeled the pthread
structures as byte arrays, and while I believe the alignment should be
correct, I'm not sure if there isn't some better way of doing this.

Also note that the patch does not include the regenerated configure
script.  Only the changes to configure.ac are included.

 - Allan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aotlock.patch
Type: application/octet-stream
Size: 24264 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/vmkit-commits/attachments/20100922/1b2ce7dd/attachment.obj>


More information about the vmkit-commits mailing list