{"push_id":677709746,"size":3,"distinct_size":3,"ref":"refs/heads/string-as-rec","head":"f7f24d2d36dba85a672a4ca2ea2522ca91c3ffe0","before":"c475596b984eec9fc67f8b12dd007f3be21e2bc3","commits":[{"sha":"d6be4c420a5a59490cbc2eb5933569b048eefa9b","author":{"email":"2b94302d36b86f447dddbe1183d3dd7ada803772@cray.com","name":"Thomas H Hildebrandt"},"message":"Move distribution destruction to domain destructors.\n\nThere was an ordering problem in the destructor for distributed domains: When\nthe distribution reference count went to zero in destroyDom(), the distribution owned\nby that domain was destroyed immediately.  But then the destructor for that same\ndomain uses the distribution (yes, the one that was just destroyed) to iterate\nacross locales and destroy the LocDoms it owns.\n\nMy solution was to push the destruction of the distribution into the individual\ndomain destructors.  This destruction explicitly follows the destruction of the\nlocal doms, so the ordering problem is removed.\n\nThis change causes 38 read-after-free errors reported by valgrind to be cured.\n\nTODO: This distributes the distribution destruction code to individual domains,\nbecause that is easiest to get right.  Later, we can make this a more factored\nsolution by having individual domain destructors call a common cleanup utility\ndefined in BaseDom.","distinct":true,"url":"https://api.github.com/repos/hildeth/chapel/commits/d6be4c420a5a59490cbc2eb5933569b048eefa9b"},{"sha":"38ca672d5ae87d24f1100c396ca0db6379d46dae","author":{"email":"2b94302d36b86f447dddbe1183d3dd7ada803772@cray.com","name":"Thomas H Hildebrandt"},"message":"Move deletion of distributed domain to individual array destructors.\n\nThere was a use-after-free error reported by valgrind in BaseArr.destroyArr(), due to the\nearly call to the distributed domain destructor.  The domain is used in the array's\ndestructor to delete the elements of locArr, so it must remain live until after this.  By\nmoving the call to the distributed domain's destructor into individual distributed array\ndestructors, we can control the order of these actions and make the dom destruction occur\nlater.\n\nTODO: We may need to add domain destructor calls for other distribution types.","distinct":true,"url":"https://api.github.com/repos/hildeth/chapel/commits/38ca672d5ae87d24f1100c396ca0db6379d46dae"},{"sha":"f7f24d2d36dba85a672a4ca2ea2522ca91c3ffe0","author":{"email":"2b94302d36b86f447dddbe1183d3dd7ada803772@cray.com","name":"Tom Hildebrandt"},"message":"Merge pull request #2004 from hildeth/fixDomainDoubleDeletion\n\nFix array and domain double deletion regressions\r\n\r\n\r\n\r\nThis fixes most (96) of the regressions that surfaced when I did a full valgrind test run.\r\n\r\nThe 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.\r\n\r\nThe 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.\r\n\r\nThe 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.\r\n\r\nFifteen new memory leak regressions were introduced as a result of this change. These will be addressed in a separate patch.","distinct":true,"url":"https://api.github.com/repos/hildeth/chapel/commits/f7f24d2d36dba85a672a4ca2ea2522ca91c3ffe0"}]}