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 — dict() resize failure · Issue #102701 · python/cpython Closed Labels type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error DescriptionBug reportWhen running under python 3.11.1, 3.11.2 and 3.12.a6, the dict() data structure fails to resize past 357913941 elements. This worked last (in what I have available) under python 3.10.8 and I can find no documentation that limits the size of a dict to a finite size. The system has >512G of memory and this example easily fits in that memory. My reproducer is mem.py: d=dict() for a in range(500000000): try: d[a]=1 except: print(a) exit(0) output: As an aside (2^31)/3/2 = 357913941. It looks to me like there is an int32 in the code that's trying to represent the size of the dict. (GROWTH_FACTOR=3) I'm not sure where the extra factor of 2 is coming from yet. Simplest reproducer is: d=dict() for a in range(500000000): d[a]=1 output: exit code=1 Your environmentI have tested on 3.10.8 (no failure) 3.11.1, 3.11.2, 3.12.a6 (fail) To reproduce I built the python with: In pyconfig.h OS: cat /proc/meminfo Fails with both Intel and AMD servers. Linked PRsActivity
MetadataMetadataAssigneesLabelstype-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error 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. |