-
Notifications
You must be signed in to change notification settings - Fork 519
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
NativeAOT: Mark module constructors in MSR #19097
Conversation
/cc: @filipnavara |
💻 [CI Build] Windows Integration Tests passed 💻✅ All Windows Integration Tests passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Ventura (13.0) passed 💻✅ All tests on macOS M1 - Mac Ventura (13.0) passed. Pipeline on Agent |
💻 [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) passed 💻✅ All tests on macOS M1 - Mac Big Sur (11.5) passed. Pipeline on Agent |
📚 [PR Build] Artifacts 📚Packages generatedView packagesPipeline on Agent |
✅ API diff for current PR / commitLegacy Xamarin (No breaking changes)
NET (empty diffs)
✅ API diff vs stableLegacy Xamarin (No breaking changes).NET (No breaking changes)ℹ️ Generator diffGenerator Diff: vsdrops (html) vsdrops (raw diff) gist (raw diff) - Please review changes) Pipeline on Agent |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🚀 [CI Build] Test results 🚀Test results✅ All tests passed on VSTS: simulator tests. 🎉 All 233 tests passed 🎉 Tests counts✅ bcl: All 69 tests passed. Html Report (VSDrops) Download Pipeline on Agent |
@mandel-macaque I think we should add a test that covers this behaviour, although I am not sure what would be the best place. Do you have any suggestions? Additionally, we should try to get this in for RC2. |
Adding a unit test will be added in a separate PR. |
Hello @ivanpovazan thank you for the fix, unfortunately due to schedule is a little late for RC2, this will be going out with RTM |
There is an issue with managed static registrar and explicitly rooted assemblies (through linker descriptor files) where the linker does not emit the created module initializer.
This was originally reported in: dotnet/runtime#92106
and a smaller repro can be set up in:
tests/dotnet/MySingleView
test project with the following changes:Smaller repro
Roots.xml
MySingleView.csproj
NOTE: This is reported for NativeAOT but seems like a general problem
Additionally, here are the disassembled linked assemblies:
It can be seen that the rooted one is missing:
The fix
This PR fixes this behaviour by explicitly marking module constructor to prevent this from happening.
Fixes dotnet/runtime#92106