Skip to content

Commit 204eda1

Browse files
committedNov 12, 2024
TODO: fix assertion due to wrong location in PException
1 parent b612d81 commit 204eda1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed
 

Diff for: ‎graalpython/com.oracle.graal.python/src/com/oracle/graal/python/builtins/modules/cext/PythonCextErrBuiltins.java

+6
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,12 @@ Object run(Object typ, PBaseException val, Object tb) {
301301
}
302302
}
303303

304+
/*- TODO: this sets as a location in the exception itself, but then we probably call setCatchLocation
305+
once the exception surfaces in the bytecode interpreter making its root node be: PBytecodeDSLRootNode.
306+
However, the Truffle stack filling logic calls PBytecodeDSLRootNodeGen.findBytecodeIndex and that
307+
asserts that the location node is instanceof AbstractBytecodeNode assuming that the location must
308+
come from that root node, which is not true in this situation. What should we do? Fixup the location
309+
of exceptions that surface from other root nodes than us? */
304310
@CApiBuiltin(ret = Void, args = {PyObject, PyObject}, call = Direct)
305311
abstract static class _PyTruffleErr_CreateAndSetException extends CApiBinaryBuiltinNode {
306312
@Specialization(guards = "!isExceptionClass(inliningTarget, type, isTypeNode, isSubClassNode)")

0 commit comments

Comments
 (0)