<xlocale>: Allocation function mismatch in _Crt_new_delete
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 1.7k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 22
Description
Describe the bug
_Crt_new_delete::new uses _malloc_dbg while _Crt_new_delete::delete uses free.
Command-line test case
STL version (git commit or Visual Studio version): cd8fee0
Expected behavior
Matching heap allocation calls.
Additional context
We found this issue while using a custom memory manager, which does not override dbg versions, only malloc/free.
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
Locate _Crt_new_delete::new and _Crt_new_delete::delete in the STL implementation and compare the heap allocation calls they use. Reproduce the command-line case against the referenced STL commit or Visual Studio version, and consider the issue done when both operations use matching allocation calls compatible with a memory manager that overrides malloc/free.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100