-
-
Notifications
You must be signed in to change notification settings - Fork 33.5k
Closed
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
The message must be prefixed by a whitespace since _Py_CheckRecursiveCall directly appends them to "maximum recursion depth exceeded":
Lines 329 to 335 in dc76a4a
| if (tstate->c_recursion_remaining <= 0) { | |
| tstate->recursion_headroom++; | |
| _PyErr_Format(tstate, PyExc_RecursionError, | |
| "maximum recursion depth exceeded%s", | |
| where); | |
| tstate->recursion_headroom--; | |
| ++tstate->c_recursion_remaining; |
Alternatively, we could make it so that a whitespace is automatically added and strip leading whitespaces if the "where" is the empty string (we wouldn't strip whitespaces in custom messages though I think).
For now, I'll just add the missing whitespaces where it should be.
CPython versions tested on:
CPython main branch
Operating systems tested on:
No response
Linked PRs
Metadata
Metadata
Assignees
Labels
3.12only security fixesonly security fixes3.13bugs and security fixesbugs and security fixes3.14bugs and security fixesbugs and security fixesextension-modulesC modules in the Modules dirC modules in the Modules dirtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error