Message384248
The code is not really cloned - note that PyErr_Restore is operating on tstate->curexc (the exception currently being handled) while PyErr_SetExcInfo is operating on tstate->exc_info (the earliest exception currently on the exception stack).
If there is a bug here, I think it is the silent conversion of traceback to NULL in the case where it is neither NULL nor Py_None. (The case in PyErr_Restore that the comment says should not happen).
Otherwise, the difference is that PyErr_Restore transforms Py_None to NULL for the traceback, and PyErr_SetExcInfo doesn't. That conversion seems neither necessary nor wrong. |
|
Date |
User |
Action |
Args |
2021-01-03 01:06:44 | iritkatriel | set | recipients:
+ iritkatriel, ezio.melotti, serhiy.storchaka, Ken.Cheung |
2021-01-03 01:06:44 | iritkatriel | set | messageid: <1609636004.29.0.12059357414.issue15106@roundup.psfhosted.org> |
2021-01-03 01:06:44 | iritkatriel | link | issue15106 messages |
2021-01-03 01:06:43 | iritkatriel | create | |
|