-
Notifications
You must be signed in to change notification settings - Fork 711
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
Update warning about calling unsigned code from macOS through FFI #4055
Comments
It looks like we can remove this, but if I'm understanding correctly, if we remove this we need to introduce another note: It seems that even with the changes, (unsigned and signed?) shared libraries need to be in the same directory or subdirectory as the signed Dart executable or use an unsigned executable. Perhaps @dcharkes can shine some light on what is import to highlight for developers around this and what the best direction to suggest to them is. |
I did some local testing, there's three modes for dylibs with 1. Signed with an identity
Running with the downloaded (by the Dart team signed) SDK works with any file path.
2. Signed ad hocUsing
Running with the downloaded (by the Dart team signed) SDK works with any file path. 3. Completely unsigned
I cannot open this dylib (with an absolute path) with the signed SDK Trying to open with a relative path will lead to A completely unsigned dylib cannot be opened with an ad hoc signed A In conclusionThe Dart SDK (or any executable for that matter) can only open signed or ad hoc signed dylibs. Paths don't matter. Opening unsigned dylibs (or running unsigned code) is completely disallowed on MacOS. All dylibs should be signed or ad hoc signed on MacOS. |
Thanks so much for the investigation and clarifications @dcharkes! It sounds like having a note is still useful but perhaps we should link to (Apple) documentation on signing libraries rather than linking to an issue with some mixed/confusing messages. |
We should probably find the relevant documentation from Apple itself, though I was unable to find it. By now, everyone has to sign / ad hoc sign on MacOS, so the limitation is nothing Dart specific as far as I understand. So we can also opt to have no message. |
As I understand it, the limitation referenced here is no longer accurate:
site-www/src/_guides/libraries/c-interop.md
Lines 78 to 82 in 757943b
It looks like dart-lang/sdk#38314 is fixed. Is that correct, @dcharkes? If so, let's remove this caveat from this page. (If not, let's update it to point to an open issue...)
The text was updated successfully, but these errors were encountered: