-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
Bug description:
pickletools' disassembler has a check here that doesn't allow memo indices to be redefined, while the pickle.Unpickler doesn't care about it, an existing item is handled without complaint here. FWIW, the opcode doc doesn't mention a restriction either.
Such pickles aren't produced by the Pickler, but it is strange for a debug tool to be more restrictive than the thing it is supposed to help debug. (I found this while fuzzing a non-Python unpickling library.) I think the check in pickletools L2497 can just be removed. A warning could also be emitted, but that would be the first such warning in pickletools.
CPython versions tested on:
3.12
Operating systems tested on:
Linux
Linked PRs
Metadata
Metadata
Assignees
Labels
3.14bugs and security fixesbugs and security fixesstdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
Status
Done