dotnet / dotnet/runtime

Add an `ilverify` flag for verifying `UnsafeAccessor`s.

Open
#130,793 8 comments 1 reaction 0 assignees View on GitHub
area-Tools-ILVerification
Dominant language
C#
Stars
18.3k
Forks
5.6k
PR merge metrics
PR metrics pending

Description

Currently there's no way to validate if all `UnsafeAccessor`s in an assembly are valid without running all of them and seeing if they throw.

Being able to check if they can be resolved with `ilverify` would help in reducing accidental breaks when changing stuff used by `UnsafeAccessor`s.

cc @jkotas @AaronRobinsonMSFT Would such option make sense? I wanted to replace a circular dependency between 2 DLLs in a project I work on but I realised that ILVerify (which we use to verify the references) would no longer report errors then.

Contributor guide

Open the contributing guide

Research direction

Start by locating ILVerify's command-line option handling and its existing UnsafeAccessor or assembly verification tests. Read how current reference errors are reported, then define the flag's expected behavior: it should validate UnsafeAccessor resolution without executing the accessors and report invalid references. Confirm the behavior with focused ILVerify tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
csharp
Domain
devtools
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.