-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Downgrade all binaries in GPUSupport.framework
- Loading branch information
1 parent
1790bbc
commit b95da2e
Showing
4 changed files
with
0 additions
and
0 deletions.
There are no files selected for viewing
Binary file added
BIN
+365 KB
.../PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/libComposeFilters.dylib
Binary file not shown.
Binary file added
BIN
+349 KB
...rivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/libllvm-flatbuffers.dylib
Binary file not shown.
Binary file added
BIN
+94.6 KB
...brary/PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/libllvm-lmdb.dylib
Binary file not shown.
Binary file added
BIN
+38.1 KB
...PrivateFrameworks/GPUCompiler.framework/Versions/31001/Libraries/libmetal_timestamp.dylib
Binary file not shown.
b95da2e
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.
These files have the
MH_DYLIB_IN_CACHE
Mach-O header flag set. This leads to crashes when debugging with LLDB, because the segment address gets sanitized leading to corrupted data. How come this flag is set?b95da2e
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.
Thank you so much for catching this! I have fixed it in dsce v7, so
lldb
should finally work on systems with legacy Metal GPUs once OCLP is updated.I completely misunderstood the crash report and would've never figured this out, so your comment is really appreciated!! (Credited you on dsce.) Thanks again.
b95da2e
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.
You're welcome! I'm glad that I could give something back!
b95da2e
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've tried to patch the system myself by mounting the root volume, removing the MH_DYLIB_IN_CACHE from the header, signing the new libraries with my developer identity (I've disable library checking so I'm not sure that was at all necessary) and creating a new blessed snapshot to boot from.
However the boot process gets stuck halfway through. Any idea what I might be missing?
b95da2e
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'm not sure. You'd have to check
/Library/Logs/DiagnosticReports
or ssh in and runlog stream -debug -info
to get an idea what's crashing. I don't see anything obviously wrong in what you've said.I've also made a branch on PatcherSupportPkg last night, so you could try those binaries if you want. It will get merged once we do some more testing and when OCLP devs have time.
b95da2e
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'll see what I can find out. Thanks!
b95da2e
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've just replaced
libGPUCompilerUtils.dylib
from your dev branch and the system won't boot anymore. Here's a screenshot from the last kernel messages:I don't see anything obviously wrong, apart from the SD card reader powering off at the very end maybe.
b95da2e
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.
Binaries in PatcherSupportPkg's release are signed with our certificates to pass AMFI checks using AMFIPass.kext.
Easiest fix is add
amfi=0x80
to your boot-argsb95da2e
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.
Thanks! Adding the boot option did the trick. Debugging SwiftUI apps now works with an unpatched LLDB. What a ride!
b95da2e
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.
Thank you Mykola, I entirely forgot about AMFIPass since I always use
amfi=128
on my systems🤦🏻♀️And thank you for your patience @cgudrian
b95da2e
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.
Don't worry, @ASentientBot. Actually I've enjoyed the past couple of days. :)
b95da2e
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 can confirm that debugging SwiftUI macOS apps now works with Xcode 14.3.1. I may be brave enough to upgrade to Xcode 15 myself tonight, though it's more likely I'll leave that endeavor to others.
I haven't yet tried debugging in the Simulator. That's the part where my MacBook starts to look old (which it is).
b95da2e
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.
It still works with Xcode 15.
b95da2e
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.
@ASentientBot sorry for pinging you, seems like the root cause of this issue has been found, but I haven't seen any changes in this repo or the main OCLP repo. It'd be great if you could create a PR with the new binaries in this repo, or maybe just a comment on the OCLP discussion.
Feel free to ignore this if the OCLP team's already aware of this fix 😅, I just want to make sure that the fix won't get unnoticed.
b95da2e
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.
@khronokernel Just realized that you made this commit and not @ASentientBot, it'd be great if you could patch the binaries and fix the lldb issue. If you're busy and working on something else it's fine too, I just hope this fix will eventually make it to a future release.