[release/6.0] Prevent AV in processinfo2 while suspended on Mono. #58158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Backport of #58099 to release/6.0
/cc @lateralusX
Customer Impact
Sending the new processinfo2 IPC command to a Mono runtime will crash runtime, in case where runtime have been setup to suspended on start up. Primarily used by CoreCLR profiler during start up, so not a scenario for Mono, but command could still have value and should not crash runtime if used when runtime has been suspended during start up.
Testing
There are new automated tests running on CI covering this new command, problem was that it was marked as JIT sensitive (no tiered JIT) and didn't run on Mono meaning that CoreCLR fix for this was not done on Mono and test didn't fail. #58106 looks at enabling these tests on main and could potentially be backported once done.
Risk
Low (similar fix already done on CoreCLR).