Skip to content

Commit ec7cf40

Browse files
committed
Fix materializing frame in ReadCallerFrameNode
1 parent 3daf41d commit ec7cf40

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ private PFrame.Reference walkLevels(PFrame.Reference startFrameInfo, FrameInstan
163163
PFrame.Reference currentFrame = startFrameInfo;
164164
for (int i = 0; i <= level;) {
165165
PFrame.Reference callerInfo = currentFrame.getCallerInfo();
166-
if (cachedCallerFrameProfile.profile(callerInfo == null)) {
166+
if (cachedCallerFrameProfile.profile(callerInfo == null || callerInfo.getPyFrame() == null)) {
167167
Frame callerFrame = getCallerFrame(startFrameInfo, frameAccess, selector, level);
168168
if (callerFrame != null) {
169169
// At this point, we must 'materialize' the frame. Actually, the Truffle frame

0 commit comments

Comments
 (0)