This looks great Tom - Good work and thanks.

TMacD

On Thu, 28 May 2015, hildeth wrote:

> Branch: refs/heads/string-as-rec
> Revision: f7f24d2
> Author: hildeth
>
> Log Message:
> ------------
> Merge pull request #2004 from hildeth/fixDomainDoubleDeletion
>
> Fix array and domain double deletion regressions
>
>
>
> This fixes most (96) of the regressions that surfaced when I did a full 
> valgrind test run.
>
> The domain read-after-free errors were due to the distribution associated 
> with a distributed domain being deleted after the domain reference count 
> reached zero but before the distributed domain's destructor was entered. The 
> destructor uses the distributed domains' distribution to destroy elements of 
> the locDom array. But since the distribution has already been deleted, 
> valgrind complains.
>
> The array read-after-free error is similar. After the ref count on a 
> distributed array goes to zero, the corresponding domain is deleted. But the 
> same domain is used later in the distributed array's destructor to destroy 
> elements of the locArr array.
>
> The cure in both cases was to remove the early deletion code (from 
> BaseDom.destroyDom() and BaseArr.destroyArr(), respectively). Code for 
> destroying the distribution was placed in the distributed doms' destructors; 
> code for destroying the distributed dom was placed in the distributed arrays' 
> destructors.
>
> Fifteen new memory leak regressions were introduced as a result of this 
> change. These will be addressed in a separate patch.
>
> Modified Files:
> ---------------
> M modules/dists/BlockCycDist.chpl
> M modules/dists/BlockDist.chpl
> M modules/dists/CyclicDist.chpl
> M modules/internal/ChapelDistribution.chpl
>
> Compare: 
> https://github.com/chapel-lang/chapel/compare/c475596b984e...f7f24d2d36db

------------------------------------------------------------------------------
_______________________________________________
Chapel-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chapel-developers

Reply via email to