-
Notifications
You must be signed in to change notification settings - Fork 549
[release/6.0.3xx] [debugger] Work around a debugger issue when using the interpreter. #15509
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
[release/6.0.3xx] [debugger] Work around a debugger issue when using the interpreter. #15509
Conversation
There's a bug in the Mono runtime where the interpreter does not disable optimizations when the debugger is attached, which leads to the interpreter optimizing code and the debugger ending up rather confused. The bug is fixed in the Mono runtime (dotnet/runtime#71436), but there's no immediate way for the runtime to release this fix, so here we're implementing a workaround that disables interpreter optimizations if the debugging is enabled. It's somewhat clunky because the Mono external API wasn't designed for this, so we have to abuse the API a bit to accomplish the effect we want. This is somewhat risky (since we're changing the startup path in a pretty big way), but there's an escape hatch via an environment variable, and also the workaround will not be in effect for release builds. While the runtime issue exists in legacy mono/mono as well, we'll fix the Mono runtime for legacy, because we don't have to wait to consume legacy mono (dotnet#15507). This means that the workaround is for .NET scenarios only. This is a backport of #dotnet#15451.
📋 [PR Build] API Diff 📋API Current PR diff✅ API Diff (from PR only) (no change) View dotnet API diffView dotnet legacy API diffAPI diff✅ API Diff from stable View dotnet API diffView dotnet legacy API diffGenerator diff✅ Generator Diff (no change) Pipeline on Agent XAMBOT-1023.Monterey' |
💻 [PR Build] Tests on macOS Mac Catalina (10.15) passed 💻✅ All tests on macOS Mac Catalina (10.15) passed. Pipeline on Agent |
❌ [PR Build] Tests on macOS M1 - Mac Big Sur (11.5) failed ❌Failed tests are:
Pipeline on Agent |
✅ [CI Build] Tests passed on VSTS: simulator tests iOS. ✅Tests passed on VSTS: simulator tests iOS. Test results# Test run in progress: Building: 19, BuildQueued: 90, Running: 4, RunQueued: 2, Succeeded: 29, Ignored: 1237, BuildFailure: 3Failed tests
Pipeline on Agent XAMBOT-1039.Monterey' |
|
Unrelated test failure https://github.com/xamarin/maccore/issues/2595 |
…reter. (dotnet#15509)". Fixes dotnet#15585. This reverts commit f7bb07e. This workaround is no longer needed, since the dotnet/runtime hash we're using contains this fix. Fixes dotnet#15585.
There's a bug in the Mono runtime where the interpreter does not disable optimizations when the debugger is attached, which leads to the interpreter optimizing code and the debugger ending up rather confused.
The bug is fixed in the Mono runtime (dotnet/runtime#71436), but there's no immediate way for the runtime to release this fix, so here we're implementing a workaround that disables interpreter optimizations if the debugging is enabled. It's somewhat clunky because the Mono external API wasn't designed for this, so we have to abuse the API a bit to accomplish the effect we want.
This is somewhat risky (since we're changing the startup path in a pretty big way), but there's an escape hatch via an environment variable, and also the workaround will not be in effect for release builds.
While the runtime issue exists in legacy mono/mono as well, we'll fix the Mono runtime for legacy, because we don't have to wait to consume legacy mono (#15507). This means that the workaround is for .NET scenarios only.
This is a backport of ##15451.