[Python-ideas] Function arguments in tracebacks
Mahmoud Hashemi
mahmoud at hatnote.com
Wed Dec 28 17:22:11 EST 2016
On Wed, Dec 28, 2016 at 2:13 PM, Nathaniel Smith <njs at pobox.com> wrote:
> On Dec 28, 2016 12:44, "Brett Cannon" <brett at python.org> wrote:
>
> My quick on-vacation response is that attaching more objects to exceptions
> is typically viewed as dangerous as it can lead to those objects being kept
> alive longer than expected (see the discussions about richer error messages
> to see that worry come out for something as simple as attaching the type to
> a TypeError).
>
>
> This isn't an issue for printing arguments or other locals in tracebacks,
> though. The traceback printing code can access anything in the frame stack.
>
> -n
>
>
Right. I'd actually be more worried about security leaks than memory leaks.
Imagine you're calling a password checking function that got bytes instead
of text, what amounts to a type check could leak the plaintext password.
One rarely sees a C traceback, let alone a textual one, except during
development, whereas Python tracebacks are seen during development and
after deployment.
Mahmoud
https://github.com/mahmoud
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20161228/7e4f42c0/attachment-0001.html>
More information about the Python-ideas
mailing list