-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
CreateSymbolicLink PInvoke retval must be marshalled as U1 #69150
Conversation
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
Tagging subscribers to this area: @dotnet/area-system-io Issue DetailsFixes #62975. Silent failures were caused by incorrect marshalling, CreateSymbolicLinkW returns BOOLEAN, which is 1 byte, as opposed to BOOL, which is 4 bytes.
|
src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateSymbolicLink.cs
Show resolved
Hide resolved
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 this be ported back to .NET 6?
@stephentoub there's a reasonable workaround, that is, checking if the link does exists after calling the create symlink method. |
/backport to release/6.0 |
/backport to release/6.0 |
Started backporting to release/6.0: https://github.com/dotnet/runtime/actions/runs/2750562888 |
@jozkee backporting to release/6.0 failed, the patch most likely resulted in conflicts: $ git am --3way --ignore-whitespace --keep-non-patch changes.patch
Applying: CreateSymbolicLink PInvoke retval must be marshalled as U1
Using index info to reconstruct a base tree...
M src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateSymbolicLink.cs
Falling back to patching base and 3-way merge...
Auto-merging src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateSymbolicLink.cs
CONFLICT (content): Merge conflict in src/libraries/Common/src/Interop/Windows/Kernel32/Interop.CreateSymbolicLink.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0001 CreateSymbolicLink PInvoke retval must be marshalled as U1
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128 Please backport manually! |
Fixes #62975. Silent failures were caused by incorrect marshalling, CreateSymbolicLinkW returns BOOLEAN, which is 1 byte, as opposed to BOOL, which is 4 bytes.