Updated ARM Spec

Rémi Forax forax at univ-mlv.fr
Mon Aug 23 03:12:34 PDT 2010


Le 23/08/2010 12:06, Rémi Forax a écrit :
> Le 23/08/2010 11:50, David Holmes a écrit :
>> I said the following on 08/23/10 19:35:
>>> ...
>>> The "suppressedException" array as I currently understand it would 
>>> need to be cleared, if the pre-allocated instances with no backtrace 
>>> can still contain "suppressedExceptions" - which I believe they can.
>>
>> I just realized however that clearing the suppressed-exception state 
>> is simply not an option as the same exception instance could be 
>> thrown concurrently in multiple threads. In short these shared 
>> immutable exception instances must remain immutable if they are to be 
>> shared. Hence they can not contain suppressed-exception information.
>>
>> David Holmes
>>
>> PS: I am not a subscriber to coin-dev.
>
> You can explicitly call setStackTrace() on a shared immutable 
> exception, hence there is a problem.
> addSupressedExceptions() will have the same issue.
>
> I think the fix is to:
> - silently discard the stack trace taken as argument of 
> setStackTrace() if the cause is 'null' (or not 'this')

if cause is null (not this will not work if the is a real cause).

> - silently don't register suppressed-exceptions if cause is 'null'
>
> Rémi

Rémi


More information about the hotspot-runtime-dev mailing list