Skip to content

Commit 7b0429e

Browse files
committed
Fix: do not sync frame values into class locals.
1 parent f6411a1 commit 7b0429e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/nodes/frame/MaterializeFrameNode.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ static PFrame freshPFrameInClassBody(VirtualFrame frame, Node location, boolean
115115
@Shared("syncValuesNode") @Cached SyncFrameValuesNode syncValuesNode) {
116116
// the namespace argument stores the locals
117117
PFrame escapedFrame = factory.createPFrame(PArguments.getCurrentFrameInfo(frameToMaterialize), location, PArguments.getArgument(frameToMaterialize, 0), true);
118-
return doEscapeFrame(frame, frameToMaterialize, escapedFrame, markAsEscaped, forceSync, syncValuesNode);
118+
// The locals dict in a class body is always custom; we must not write the values from the
119+
// frame to this dict.
120+
return doEscapeFrame(frame, frameToMaterialize, escapedFrame, markAsEscaped, false, syncValuesNode);
119121
}
120122

121123
/**

0 commit comments

Comments
 (0)