GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Missing critical section for `PyDict_Next` in `_pickle.c` · Issue #150157 · python/cpython Closed Labels extension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportBug description:
import pickle, sys, threading, types class NoModule: pass NoModule.__module__ = None # forces whichmodule to scan sys.modules def _pickle_worker(): for _ in range(200_000): try: pickle.dumps(NoModule) except Exception: pass def _mutate_worker(): for i in range(200_000): name = f"__tmp_{i % 200}" sys.modules[name] = types.ModuleType(name) sys.modules.pop(f"__tmp_{(i - 50) % 200}", None) threads = [threading.Thread(target=_pickle_worker) for _ in range(4)] threads += [threading.Thread(target=_mutate_worker)] for t in threads: t.start() for t in threads: t.join() gives $ ./python.exe ../repro.py zsh: segmentation fault ./python.exe ./repro.py Proposed fixWrap the CPython versions tested on:CPython main branch Operating systems tested on:macOS Linked PRs
Activity
MetadataMetadataAssigneesLabelsextension-modulesC modules in the Modules dirC modules in the Modules dirtopic-free-threadingtype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |