[armedbear-devel] Space leak due to threads stuck in LispThread map

Pendergrass, James A. James.Pendergrass at jhuapl.edu
Thu Jul 26 20:21:32 UTC 2012

On Jul 24, 2012, at 2:31 PM, Ville Voutilainen wrote:

> On 24 July 2012 16:47, Pendergrass, James A.
> <James.Pendergrass at jhuapl.edu> wrote:
>> The attached patch is my attempt at modifying LispThread to only hang on to
>> Java Threads using weak references.  I haven't tested this extensively, but
>> it solves my problem with out blowing up.
> Can you please explain why it checks the thread reference for
> isAlive(), but performs no reference checks for
> join()/interrupt()/getStackTrace()?

Because I didn't have a good answer as to what should be done when calling join(), interrupt(), or getStackTrace() on a LispThread for a Java Thread that no longer exists, so throwing the null pointer exception seemed as valid as anything else.  For isAlive() I felt the correct answer was to return false as the LispThread is clearly not alive if the Java Thread is gone.

More information about the armedbear-devel mailing list