Skip to content

Commit

Permalink
TODO: fix assertion due to wrong location in PException
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-s committed Nov 12, 2024
1 parent b612d81 commit 204eda1
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ Object run(Object typ, PBaseException val, Object tb) {
}
}

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

0 comments on commit 204eda1

Please sign in to comment.