Skip to content

Add defensive null‑check for pTargetMD - #131994

Open
dovydenkovas wants to merge 1 commit into
dotnet:mainfrom
dovydenkovas:fix-CreateTailCallHelperStubs-null-deref
Open

Add defensive null‑check for pTargetMD#131994
dovydenkovas wants to merge 1 commit into
dotnet:mainfrom
dovydenkovas:fix-CreateTailCallHelperStubs-null-deref

Conversation

@dovydenkovas

@dovydenkovas dovydenkovas commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

pCalleeMD could be dereferenced even if it is NULL because there are no checks in place. Add checks in GenerateGCDescriptor method before accessing pTargetMD to prevent a potential null pointer dereference if the target method descriptor is not supplied.

Signed-off-by: Aleksandr Dovydenkov asd@altlinux.org
Found by Linux Verification Center (linuxtesting.org) with SVACE.

Check before accessing pTargetMD prevents a
potential dereference if the target method
descriptor is not supplied, while preserving
the existing assertion and token‑writing logic.
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 3 pipeline(s).
13 pipeline(s) were filtered out due to trigger conditions.
There may be pipelines that require an authorized user to comment /azp run to run.

@dotnet-policy-service dotnet-policy-service Bot added the community-contribution Indicates that the PR has been added by a community member label Aug 7, 2026

@jkotas jkotas left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not a correct fix for the theoretical problem found by your scanner.

Do you have a repro that is able to hit the problematic condition? If not, this should be closed.

@jkotas jkotas added the needs-author-action An issue or pull request that requires more info or actions from the author. label Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area-VM-coreclr community-contribution Indicates that the PR has been added by a community member needs-author-action An issue or pull request that requires more info or actions from the author.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants