microsoft / microsoft/CLRInstrumentationEngine

Convert CComPtr.Attach(new TYPE) to not throw

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.