-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
[iOS] Generate unique class name for MonoDeadLetter #89956
Conversation
In library mode, it is possible to have multiple shared libraries (runtimes) loaded in the same process. We have a small bit of objc to make sure we know when threads die to we can properly detach the runtime. Unfortunately, the class name we use is not unique and results in a crash when calling into a 2nd library. This change makes the class name partially unqiue to avoid such a circumstance.
Multiple mono runtimes can't really coexist in the same process. |
From what we've found, as long as you enable signal chaining, it will work. |
@lateralusX in testing two libraries, xcode found two instances of
Does that need the same treatment as |
Did you get build/package errors or runtime load errors due to that? |
No, it just says there are two and it'll be random which one you get. |
But when do you get the error, when you are packing the two libraries into the same app or at runtime when you load the second library? |
It's right away. Must be the way obj-c manages its symbols? |
In library mode, it is possible to have multiple shared libraries (runtimes) loaded in the same process. On iOS, we have a small bit of objc to make sure we know when threads die so we can properly detach the runtime. Unfortunately, the class name we use is not unique and results in a crash when calling into a 2nd library.
This change makes the class name partially unique to avoid such a circumstance.