-
Notifications
You must be signed in to change notification settings - Fork 5.2k
don't try to test module path if we can't load the module #57590
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Tagging subscribers to this area: @dotnet/area-system-diagnostics-process Issue Detailsfixes #57452
|
| if (moduleHandle == IntPtr.Zero) | ||
| { | ||
| Assert.Equal(126, Marshal.GetLastWin32Error()); // ERROR_MOD_NOT_FOUND | ||
| Assert.Equal(Architecture.X86, RuntimeInformation.ProcessArchitecture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we keep this assert or is it unstable as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was hoping that 126 (ERROR_MOD_NOT_FOUND) is the only error we can get from LoadLibrary, but from the log that you have provided it seems that this syscall can fail with other errors as well.
FWIW in this particular case it failed with ERROR_INSUFFICIENT_BUFFER (The data area passed to a system call is too small) while we don't pass any buffers to the syscall (assuming that we don't threat the valid path as buffer)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, I was referring to the Assert from line 40
| IntPtr moduleHandle = Interop.Kernel32.LoadLibrary(longNamePath); | ||
| if (moduleHandle == IntPtr.Zero) | ||
| { | ||
| Assert.Equal(126, Marshal.GetLastWin32Error()); // ERROR_MOD_NOT_FOUND |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we bring back this assert in 7.0 and expand it to handle 122 (the error in helix)?
|
dotnet-linker-tests (Build Browser wasm release Runtime_Release) and runtime-dev-innerloop (Build Linux x64 release SourceBuild) are nuget restore issues. |
fixes #57452