Internal DSO errors and/or TCClassNotFoundException from 
TCObject.resolveArrayReference() produce IllegalMonitorStateException
------------------------------------------------------------------------------------------------------------------------------

                 Key: CDV-472
                 URL: https://jira.terracotta.org/jira//browse/CDV-472
             Project: Community Development
          Issue Type: Bug
          Components: DSO:L1
            Reporter: Tim Eck
            Assignee: Issue Review Board


The code that introduces synchronization on the resolve lock during array 
de-reference does handle exceptions correctly. In fact, the original exception 
will get lost and an IllegalMonitorStateException will be generated instead.

Exceptions can occur in this code path if:

a) Something unexpected like an OOME happens
b) There is a programming error in the TC code, like an assertion failure
c) The class for the array element cannnot be resolved. 

The one that I worry most about is (c) since that is something a user can more 
or less naturally do on their own. Although, even though they are getting the 
wrong exception, I can't imagine the handling would really be any different in 
practice, it will an unexpected exception. 

If possible, it would be nice to isolate the deference into a helper method 
where we can make sure the the synchronization is always done correctly. It is 
hard (impossible?) to do inline at the moment since an existing exception 
handler can already be covering the code. But using a helper method means 
computing the type of dereference since AALOAD is not a typed instruction. The 
verifier won't let us just write a method that returns Object here :-(

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://jira.terracotta.org/jira//secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        
_______________________________________________
tc-dev mailing list
[email protected]
http://lists.terracotta.org/mailman/listinfo/tc-dev

Reply via email to