Skip to content

Conversation

@gonX
Copy link
Member

@gonX gonX commented Oct 13, 2025

This changes the type hint of the function to be nullable, which should help expose misuse of the function type. It also adds a null check before running the code.

Fixes #4228 and might need to be cherry-picked into a hotfix patch since this breaks the driver completely for anyone with a kernel driver loaded on at least Linux.

gonX added 3 commits October 13, 2025 18:10
If the array provided to the function is empty, it will not return
anything.

Changing the type indicates this behavior better, and should allow code
analysis to catch misuse of this function
@github-actions github-actions bot added the daemon Affects the driver itself label Oct 13, 2025
@gonX gonX added the bug Something isn't working label Oct 13, 2025
@gonX gonX marked this pull request as draft October 13, 2025 16:30
@gonX
Copy link
Member Author

gonX commented Oct 13, 2025

Closing as this is nonsense. Testing an IEnumerable<string> function that never yields in a test program as such:

static IEnumerable<string> testFunc()
{
  if (0>1)
    yield return "Math has failed us";
}

Console.WriteLine(testFunc());
foreach (var x in testFunc())
{
  Console.WriteLine("looping");
  Console.WriteLine(x);
}

outputs:

$ dotnet run -c Debug
Program+<<<Main>$>g__testFunc|0_0>d

ie. it is never null

@gonX gonX closed this Oct 13, 2025
@gonX gonX deleted the 06x-fix-nre-getprocessdetails branch October 13, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working daemon Affects the driver itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant