microsoft / microsoft/CLRInstrumentationEngine
Improve type safety of internal classes
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 102
- Forks
- 52
- Avg merge
- 13h 11m
- Merged PRs (30d)
- 6
Description
There are a number of places where we cast from a base class to a derived class in our internal code, which could cause problems if a caller passes us an instance of an interface that we did not create internally. I suggest we:
-
Update our code to use virtual inheritance (instead of multiple inheritance). This will help us catch locations where we cast from a base class.
-
QI for the derived class. This will give us type safety.
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
Start by inventorying the internal classes and base-to-derived casts affected by the issue, then trace where those objects enter the instrumentation engine. Compare the current inheritance and interface patterns with the proposed virtual inheritance and derived-class QI approach; done means the relevant unsafe casts have been addressed and the affected paths remain compatible.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- devtools
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100