dotnet / dotnet/macios

Detect and fix returning fixed pointers from a function/property.

Open
#17,020 4 comments 0 reactions 0 assignees View on GitHub
bug copilot-candidate good first issue
Dominant language
C#
Stars
2.9k
Forks
576
Avg merge
2d 13h
Merged PRs (30d)
96

Description

This pattern is not GC safe:

https://github.com/xamarin/xamarin-macios/blob/cbf459a608ff18304cc9616ea7bfde0c8d14c018/src/CoreMidi/MidiServices.cs#L848-L850

because the `p` pointer is only valid (fixed) inside the `fixed` statement.

We have to find all such patterns, and fix them to not return fixed pointers.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.