This is an automated email from the ASF dual-hosted git repository.
mboehm7 pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
The following commit(s) were added to refs/heads/main by this push:
new bd446fd82e [SYSTEMDS-3591] Fix variable cleanup of function return
values
bd446fd82e is described below
commit bd446fd82e50b8843908370fb33e304f34dfb768
Author: Matthias Boehm <[email protected]>
AuthorDate: Tue Jul 4 19:51:02 2023 +0200
[SYSTEMDS-3591] Fix variable cleanup of function return values
This patch fixes the previous commit which broke the buffer pool leak
test, because we did check the new value instead of the value that
was about to be overwritten and thus deleted. The new value always is
in the retVars set and thus, the old buffer pool leak showed up again.
---
.../sysds/runtime/instructions/cp/FunctionCallCPInstruction.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/src/main/java/org/apache/sysds/runtime/instructions/cp/FunctionCallCPInstruction.java
b/src/main/java/org/apache/sysds/runtime/instructions/cp/FunctionCallCPInstruction.java
index 606eb4fc84..899bb7a59a 100644
---
a/src/main/java/org/apache/sysds/runtime/instructions/cp/FunctionCallCPInstruction.java
+++
b/src/main/java/org/apache/sysds/runtime/instructions/cp/FunctionCallCPInstruction.java
@@ -238,9 +238,9 @@ public class FunctionCallCPInstruction extends
CPInstruction {
//cleanup existing data bound to output variable name
Data exdata = ec.removeVariable(boundVarName);
- if( exdata != boundValue &&
!retVars.hasReferences(boundValue) )
+ if( exdata != boundValue &&
!retVars.hasReferences(exdata) )
ec.cleanupDataObject(exdata);
-
+
//add/replace data in symbol table
ec.setVariable(boundVarName, boundValue);