Skip to content

Commit 1727a5a

Browse files
committed
Assert that PythonObjectSlowPathFactory is not shared between contexts
1 parent dd0b294 commit 1727a5a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/object/PythonObjectSlowPathFactory.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@
4343
import java.util.Objects;
4444

4545
import com.oracle.graal.python.builtins.objects.type.TypeNodesFactory.GetInstanceShapeNodeGen;
46+
import com.oracle.graal.python.runtime.PythonContext;
4647
import com.oracle.truffle.api.CompilerDirectives.TruffleBoundary;
4748
import com.oracle.truffle.api.instrumentation.AllocationReporter;
4849
import com.oracle.truffle.api.nodes.NodeCost;
@@ -65,6 +66,7 @@ public PythonObjectSlowPathFactory(AllocationReporter reporter) {
6566
@TruffleBoundary
6667
@Override
6768
protected AllocationReporter executeTrace(Object arg0Value, long arg1Value) {
69+
assert PythonContext.get(null).getAllocationReporter() == reporter;
6870
return PythonObjectFactory.doTrace(arg0Value, arg1Value, reporter);
6971
}
7072

0 commit comments

Comments
 (0)