Skip to content

Conversation

@radekdoulik
Copy link
Member

@radekdoulik radekdoulik commented Sep 19, 2017

Make sure the methods required by the debugger are not linked out. Fixes #59516.

Note that this commit doesn't fix the assert reported in #59015 on
Android as it happens with linker turned off as well. So that will
need another fix.

Make sure the methods required by the debugger are not linked out.

Note that this commit doesn't fix the assert reported in #59015 on
Android as it happens with linker turned off as well. So that will
need another fix.
@jonpryor jonpryor merged commit 15f8793 into dotnet:master Sep 19, 2017
radekdoulik added a commit that referenced this pull request Sep 19, 2017
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=59516
Context: https://bugzilla.xamarin.com/show_bug.cgi?id=59015

The linker requires that the target process contain members such as
`System.Threading.Tasks.Task.NotifyDebuggerOfWaitCompletion()`.
If these members are missing, the runtime may abort:

	* Assertion at …xamarin-android/external/mono/mono/mini/debugger-agent.c:4765, condition `array->len == 1' not met
	[libc] Fatal signal 6 (SIGABRT), code -6 in tid 11492 (…)

Update the linker so that `async`-related Debugger support
infrastructure is preserved, so that the debugger can rely on them.

*Note*: This commit does *not* fix the assert reported in Bug #59015
on Android as that happens when the linker is disabled as well.
Fixing the assert from Bug #59015 will require another fix.
jonpryor pushed a commit that referenced this pull request Sep 16, 2021
Fixes: #6271

Context: 2d81740
Context: #5749
Context: dotnet/java-interop@d16b1e5

Changes: dotnet/java-interop@f359e73...8f7ddcd

  * dotnet/java-interop@8f7ddcdd: [build] Fix 'BuildVersionInfo_g_cs' build target. (#881)
  * dotnet/java-interop@7068f4b2: [build] Enable string operations globalization code analyzers. (#879)
  * dotnet/java-interop@3e6a6232: [build] Use GitInfo to Generate Version information. (#875)

In order to better support building solutions which reference both
.NET 6 and legacy projects within Visual Studio, we have begun
strong-naming all the MSBuild-related assemblies; see also 2d81740.
This allows loading two different version of the "same" assembly, e.g.
`Java.Interop.Tools.Diagnostics.dll`, from two different filesystem
locations in the same AppDomain/AssemblyLoadContext.

However, strong-naming is only part of the solution.  The other part
is that, for sanity and reliability, the "two different versions of
the 'same' assembly" should *also* have different assembly *versions*.
If they have the same assembly version, are they truly different?

Multiple sub-modules have been updated to use the [`GitInfo`][0]
[NuGet Package][1] so that assembly versions are unique per-commit:

  * `external/xamarin-android-tools`: 25c5cb5
  * `.external` & `monodroid`: 2d81740

Update the `external/Java.Interop` submodule to follow suit.

This in turn requires updates to `xaprepare` and the CI YAML files to
ensure that `GitInfo` is configured correctly within Java.Interop.

[0]: https://github.com/devlooped/GitInfo
[1]: https://www.nuget.org/packages/GitInfo/2.1.2
@github-actions github-actions bot locked and limited conversation to collaborators Feb 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants