Closed
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
Projects
Status
Done