Revisit the limitation of shared_ptr counter to 32 bit
Open
Nobody has claimed this yet.
bug
vNext
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
32 bit size of shared_ptr counter limits the number of copies that can be created.
It can potentially overflow in 64 mode.
Note: to create 4.3 billion refs need 69 billion bytes of memory.
It would also take a significant amount of time on x86 due to atomic increment cost.
Still should be possible.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue names no files, tests, or entry points. Locate the shared_ptr counter implementation and its existing tests first, then investigate 64-bit behavior and define tests that demonstrate the counter no longer has the reported limitation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100