-
Couldn't load subscription status.
- Fork 5.2k
Mark labels in x64 write barrier code as local/alt_entry #119245
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: @mangod9 |
|
I am not sure if the failures are new to the PR or introduced by something in The symbols in my local build look okay ( The "rep retq" sequence also seems to be at the correct spot: |
46c15ab to
d2bb5f3
Compare
|
The x64 code in |
7f52be8 to
969e3c4
Compare
|
I downloaded the failing payload from Helix and it has broken unwind info (it gets split on .alt_entry and creates bogus 0x00000000 unwind code): This is not happening for my local builds because I use Xcode 26 beta 6 which already fixed this particular bug (#119005). I'll try to workaround it. |
…ncorrect transformations by the ld64/ld-prime linkers
96e4939 to
16edcca
Compare
16edcca to
31b47d7
Compare
|
@filipnavara it seems to me that the option 2 you've suggested would be a reasonable fix for now. |
|
I'll look into it once I get back to my Mac. I think we just need a right place to put something like this: |
|
I was going to put it in |
|
Now that xcode 26 is released, can we rely on "upgrade to xcode 26" as the solution going forward? Or is this PR still necessary? |
|
we don't control when AzDO/GitHub updates Xcode on the mac machines, and afaik the problem is with the new linker in Xcode 16+ so it presumably has the same problem in Xcode 26 |
|
The originally reported problem affects all Xcodes with new linker, so presumably anything with Xcode 16+, including Xcode 26. It may or may not be triggered in a specific build depending on what layout and dead code elimination the linker decides to use. The added Unfortunately, there're numerous disjoint bugs in support for In summary, |
|
Thanks! I'm interested in anything we can do to make this problem more manageable in the future. |
|
I think we also need to at least backport the switch to ld_classic to servicing branches since we won't be able to stay on older macOS for very long |
|
@janvorli Anything else here? |
|
@agocke it looks good to me as is |
|
/backport to release/10.0 |
|
Started backporting to release/10.0: https://github.com/dotnet/runtime/actions/runs/18666782672 |
|
/backport to release/9.0-staging |
|
Started backporting to release/9.0-staging: https://github.com/dotnet/runtime/actions/runs/18666818024 |
|
/backport to release/8.0-staging |
|
Started backporting to release/8.0-staging: https://github.com/dotnet/runtime/actions/runs/18666828338 |
|
@agocke backporting to "release/9.0-staging" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Mark labels in x64 write barrier code as local/alt_entry to prevent incorrect transformations by the ld64/ld-prime linkers
Applying: Fix the LEAF_END_MARKED macro for Apple platforms too
Applying: Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms
Using index info to reconstruct a base tree...
M src/coreclr/pal/inc/unixasmmacrosamd64.inc
M src/coreclr/pal/inc/unixasmmacrosarm64.inc
M src/coreclr/vm/arm64/patchedcode.S
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/pal/inc/unixasmmacrosamd64.inc
Auto-merging src/coreclr/pal/inc/unixasmmacrosarm64.inc
Auto-merging src/coreclr/vm/arm64/patchedcode.S
CONFLICT (content): Merge conflict in src/coreclr/vm/arm64/patchedcode.S
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
|
@agocke backporting to "release/8.0-staging" failed, the patch most likely resulted in conflicts: $ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch
Applying: Mark labels in x64 write barrier code as local/alt_entry to prevent incorrect transformations by the ld64/ld-prime linkers
Applying: Fix the LEAF_END_MARKED macro for Apple platforms too
Applying: Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms
Using index info to reconstruct a base tree...
M src/coreclr/pal/inc/unixasmmacrosamd64.inc
M src/coreclr/pal/inc/unixasmmacrosarm64.inc
A src/coreclr/vm/amd64/patchedcode.S
A src/coreclr/vm/arm64/patchedcode.S
Falling back to patching base and 3-way merge...
Auto-merging src/coreclr/pal/inc/unixasmmacrosamd64.inc
Auto-merging src/coreclr/pal/inc/unixasmmacrosarm64.inc
CONFLICT (modify/delete): src/coreclr/vm/amd64/patchedcode.S deleted in HEAD and modified in Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms. Version Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms of src/coreclr/vm/amd64/patchedcode.S left in tree.
CONFLICT (modify/delete): src/coreclr/vm/arm64/patchedcode.S deleted in HEAD and modified in Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms. Version Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms of src/coreclr/vm/arm64/patchedcode.S left in tree.
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0003 Mark all labels inside JIT_PatchedCode region as .alt_entry on Apple platforms
Error: The process '/usr/bin/git' failed with exit code 128Please backport manually! |
…ry (#120923) Backport of #119245 to release/10.0 /cc @agocke @filipnavara ## Customer Impact - [ ] Customer reported - [X] Found internally [Select one or both of the boxes. Describe how this issue impacts customers, citing the expected and actual behaviors and scope of the issue. If customer-reported, provide the issue number.] ## Regression - [X] Yes - [ ] No This is a regression in the new Apple toolset. ## Testing Tested manually, and in macios CI. ## Risk Medium, product change coming somewhat late. However, this change has been running in the `main` branch for a couple weeks with no issue. --------- Co-authored-by: Filip Navara <[email protected]>
Mark labels in x64 write barrier code as local/alt_entry to prevent incorrect transformations by the ld64/ld-prime linkers.
Contributes to #119174