diff options
author | Benjamin Peterson <benjamin@python.org> | 2018-09-10 15:43:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 15:43:10 (GMT) |
commit | d545869d084e70d4838310e79b52a25a72a1ca56 (patch) | |
tree | 56b624b6b77b7db4a8f12952480e0224e228c72c /Misc | |
parent | 54752533b2ed1c898ffe5ec2e795c6910ee46a39 (diff) | |
download | cpython-d545869d084e70d4838310e79b52a25a72a1ca56.zip cpython-d545869d084e70d4838310e79b52a25a72a1ca56.tar.gz cpython-d545869d084e70d4838310e79b52a25a72a1ca56.tar.bz2 |
bpo-34588: Fix an off-by-one error in traceback formatting. (GH-9077)
The recursive frame pruning code always undercounted the number of elided frames
by one. That is, in the "[Previous line repeated N more times]" message, N would
always be one too few. Near the recursive pruning cutoff, one frame could be
silently dropped. That situation is demonstrated in the OP of the bug report.
The fix is to start the identical frame counter at 1.
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Core and Builtins/2018-09-05-22-56-52.bpo-34588.UIuPmL.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Core and Builtins/2018-09-05-22-56-52.bpo-34588.UIuPmL.rst b/Misc/NEWS.d/next/Core and Builtins/2018-09-05-22-56-52.bpo-34588.UIuPmL.rst new file mode 100644 index 0000000..ec7a57f --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2018-09-05-22-56-52.bpo-34588.UIuPmL.rst @@ -0,0 +1,2 @@ +Fix an off-by-one in the recursive call pruning feature of traceback +formatting. |