[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Pnet-developers] static constructor bug
From: |
Gopal V |
Subject: |
Re: [Pnet-developers] static constructor bug |
Date: |
Thu, 02 Feb 2006 18:07:47 +0530 |
User-agent: |
Mozilla Thunderbird 1.0.7-1.4.1.centos4 (X11/20051007) |
Tim Nichols wrote:
I hacked in a fix, but it seems too ugly to be generally useful - it
involved a new opcode (CCTOR_DONE) that checks if a static constructor
has completed, and a per class mutex that is locked in CCTOR_ONCE and
unlocked in CCTOR_DONE. This mutex has to be recursive since a single
thread can re-enter a static constructor more than once.
...
If someone has a better fix, please let me know. I'm playing around
with the 0.7.2 code base.
0.7.2 is six months old :)
(This app also demonstrates how often Is*Constructor is called and why
having currentMethod not set results in superfluous invocations of
CVM_OUT_PTR(COP_CALL, cctor); in cvmc_call.c).
Interesting. I am still in the timezone-switching phase of the post
travel trauma. I'll probably dig back into the engine sometime around
tuesday. Was planning to dig into libjit, but this is more familiar
territory.
Cheers,
Gopal