Branch: refs/heads/master
Revision: caf146c
Author: e-kayrakli
Log Message:
Merge pull request #17478 from e-kayrakli/fix-shared-tuple-leak
Apply Michael's patch to fix a leak
Resolves https://github.com/Cray/chapel-private/issues/1833
This PR closes a leak that happens when implicitly converting non-nilables
to nilables within tuples. A small reproducer of the issue is:
class C {}
proc foo(const ref arg: (shared C?,)) {
writeln(arg);
}
proc main() {
var t1 = (new shared C(), );
foo(t1);
}
where the workaround was to add an explicit cast while passing the tuple as an argument.
[Developed by @mppf, tested/merged by @e-kayrakli]
Test:
-
[x] asan
-
[x] standard
-
[x] gasnet
Modified Files:
A test/classes/delete-free/tuple-leak.chpl
A test/classes/delete-free/tuple-leak.execopts
A test/classes/delete-free/tuple-leak.good
M compiler/resolution/addAutoDestroyCalls.cppCompare: Comparing ec296d3675f9...caf146c00309 · chapel-lang/chapel · GitHub