Skip to content

Commit f6411a1

Browse files
committed
Fix: skip non-Python frames when retrieving caller info.
1 parent d7e6c86 commit f6411a1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

graalpython/com.oracle.graal.python/src/com/oracle/graal/python/runtime/ExecutionContext.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,9 +164,9 @@ public void exit(VirtualFrame frame, PRootNode node) {
164164
firstRequest = false;
165165

166166
// n.b. We need to use 'ReadCallerFrameNode.getCallerFrame' instead of
167-
// 'Truffle.getRuntime().getCallerFrame()' because we still need to filter
168-
// internal frames.
169-
Frame callerFrame = ReadCallerFrameNode.getCallerFrame(info, FrameInstance.FrameAccess.READ_ONLY, true, 0);
167+
// 'Truffle.getRuntime().getCallerFrame()' because we still need to skip
168+
// non-Python frames, even if we do not skip frames of builtin functions.
169+
Frame callerFrame = ReadCallerFrameNode.getCallerFrame(info, FrameInstance.FrameAccess.READ_ONLY, false, 0);
170170
if (PArguments.isPythonFrame(callerFrame)) {
171171
callerInfo = PArguments.getCurrentFrameInfo(callerFrame);
172172
} else {

0 commit comments

Comments
 (0)