microsoft / microsoft/CLRInstrumentationEngine
Convert CComPtr.Attach(new TYPE) to not throw
Open
Nobody has claimed this yet.
bug
- Dominant language
- C++
- Stars
- 102
- Forks
- 52
- Avg merge
- 13h 11m
- Merged PRs (30d)
- 6
Description
Use CComPtr.Attach(new (nothrow) TYPE) instead. This ensures that if the system is out of memory, the pointer is set to NULL rather than an exception being thrown.
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
Search the C++ codebase for CComPtr.Attach(new TYPE) occurrences and inspect the surrounding allocation paths. Replace the throwing allocation form as specified, then verify that an out-of-memory allocation leaves the pointer null rather than raising an exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100