-
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
Allow interop resolvers to return self handle #78004
Conversation
Tagging subscribers to this area: Issue DetailsWhen user-defined resolvers return self handle via Fix is to test the resolver returned handle against self; before the map lookup (which happens under the lock). Close #77985.
|
@lambdageek, @vargaz, candidate of backport? ( |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3419652288 |
@lambdageek, could you please run the Android pipeline ( |
/azp run runtime-extra-platforms |
Azure Pipelines successfully started running 1 pipeline(s). |
On main we can also do In general we should try to avoid merging a backport for PRs that weren't yet merged to main, we'd probably have caught this earlier. |
@lambdageek, could you re-run the leg? The tests are passing locally now. For the internal call, we needed to continue looking up in the map. |
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
For some reason, it wasn't failing the debug build @lambdageek, sure. I will add a case in resolver tests. |
|
4156ab6
to
2443e43
Compare
Added a test and rebased. I had to change the way we resolve self handle on Android: use @lambdageek, please azp run again. 🙂 |
2443e43
to
b3473b5
Compare
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
Thank you. So Android legs were green. I have disabled the new test on Windows and monointerpreter:
|
src/tests/Interop/NativeLibrary/MainProgramHandle/MainProgramHandleTests.cs
Show resolved
Hide resolved
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
This reverts commit de8eced.
@lambdageek, it's green (including |
/azp run runtime-android |
Azure Pipelines successfully started running 1 pipeline(s). |
/backport to release/7.0 |
Started backporting to release/7.0: https://github.com/dotnet/runtime/actions/runs/3534964800 |
/azp run runtime-androidemulator |
Azure Pipelines successfully started running 1 pipeline(s). |
New test passed on Android emulator. LGTM. Thanks @am11 |
When user-defined resolvers return self handle via
GetMainProgramHandle()
, we lookup the cached handle in mono and fail to find one becauseinternal_module
is not cached innative_library_module_map
.Fix is to test the resolver returned handle against self; before the map lookup (which happens under the lock).
Close #77985.