CreateSymbolicLink PInvoke retval must be marshalled as U1#69150
CreateSymbolicLink PInvoke retval must be marshalled as U1#69150stephentoub merged 2 commits intodotnet:mainfrom
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
stephentoub
left a comment
There was a problem hiding this comment.
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 128Please 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.