[New-bugs-announce] [issue46074] deepfreeze should rehash all strings upon reset

Guido van Rossum report at bugs.python.org
Tue Dec 14 11:58:45 EST 2021


New submission from Guido van Rossum <guido at python.org>:

In https://github.com/python/cpython/pull/30096#discussion_r768802144 it is pointed out that the hash seed can be changed if the interpreter is reset.

To guard against this we need to force (re)calculation of all hash seeds in the generated code when the corresponding code object is retrieved. This can be done by adding extra code to the `_Py_get_<name>_toplevel()` functions. (Strings that are shared between code objects will have to be rehashed repeatedly -- no big deal.)

----------
components: Build
messages: 408550
nosy: gvanrossum
priority: normal
severity: normal
stage: test needed
status: open
title: deepfreeze should rehash all strings upon reset
type: behavior
versions: Python 3.11

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46074>
_______________________________________


More information about the New-bugs-announce mailing list