Skip to content

Commit f76c593

Browse files
committed
Fix: Always use root node as location if there is no call node.
1 parent b123dc9 commit f76c593

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,15 +167,15 @@ public Frame visitFrame(FrameInstance frameInstance) {
167167
// avoid overriding the location if we don't know it
168168
if (callNode != null) {
169169
info.setCallNode(callNode);
170-
} else if (pRootNode.isPythonInternal()) {
170+
} else {
171171
// In some special cases we call without a Truffle call node; in
172172
// this case, we use the root node as location (e.g. see
173173
// AsyncHandler.processAsyncActions).
174174
info.setCallNode(pRootNode);
175175
}
176176
// We may never return a frame without location because then we
177177
// cannot materialize it.
178-
assert info.getCallNode() != null : "tried to read frame without location";
178+
assert info.getCallNode() != null : "tried to read frame without location (root: " + pRootNode + ")";
179179
return frame;
180180
}
181181
i += 1;

0 commit comments

Comments
 (0)