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 — str.maketrans on a mutating dict is not thread-safe · Issue #145142 · python/cpython Closed Labels easyinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump DescriptionCrash reportWhat happened?A reproducer (in the format of import unittest from test.support import threading_helper threading_helper.requires_working_threading(module=True) class ItertoolsThreading(unittest.TestCase): @threading_helper.reap_threads def test_maketrans(self): number_of_iterations = 10 number_of_attempts=100 for _ in range(number_of_iterations): print(f'iteration {_}') d = {2000: 'a'} def work_iterator(dct): for idx in range(number_of_attempts): str.maketrans(dct) idx = 2000 + idx # outside range of small ints dct[idx] = chr(idx%16) dct.pop(idx, None) threading_helper.run_concurrently(work_iterator, nthreads=10, args=[d]) if __name__ == "__main__": unittest.main() print('done') At first glance it seems that the iteration using cpython/Objects/unicodeobject.c Line 13158 in 24cc998
(found when reviewing #145129) CPython versions tested on:CPython main branch Operating systems tested on:Windows Output from running 'python -VV' on the command line:No response Linked PRsActivity
MetadataMetadataAssigneesLabelseasyinterpreter-core(Objects, Python, Grammar, and Parser dirs)(Objects, Python, Grammar, and Parser dirs)topic-free-threadingtype-crashA hard crash of the interpreter, possibly with a core dumpA hard crash of the interpreter, possibly with a core dump ProjectsMilestoneRelationshipsDevelopmentIssue 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. |