|
[
Permlink
| « Hide
]
Phil Steitz added a comment - 13/Jun/09 01:27 AM
Looking at the patch again and the same pattern in case WHEN_EXHAUSTED_FAIL, I am concerned that while the exception-generating thread waits to acquires the lock on the pool to remove the latch, another thread could sneak in and do something (e.g. return and object) that triggers an allocate, which will leak an object onto the soon-to-be-abandoned latch.
I agree with your analysis. I'd also add that similar problems can occur in each of the case statements. When a thread enters a sync block, there needs to be a check that another thread hasn't allocated an object whilst the current thread was waiting for a lock.
I have a patch for GOP and GKOP. I'll commit it shortly. Fixed in trunk. Thanks for catching this.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||