Conversation
…egistering types. Change triggered by https://bugzilla.xamarin.com/show_bug.cgi?id=44448 It's possible for the register call to be called on a thread that hasn't been registered with Mono yet. As such, the `mono_domain_get` call will return NULL until `mono_jit_thread_attach` is invoked where domain information for the current thread becomes correct. This is an issue because it means we invoke `monodroid_runtime_invoke` passing NULL as a bogus domain argument. This caused a crash with `mono_domain_set` as it doesn't support being passed a NULL domain. This commit solves the problem by re-requesting the current domain after the `mono_jit_thread_attach` call. If the thread had been registered beforehand, this will essentially be a no-op as it should return the same domain again. If it hadn't, attaching the thread will have set the current domain to be the root appdomain which will be returned by `mono_domain_get` making our current domain variable now valid.
jonpryor
pushed a commit
that referenced
this pull request
Sep 20, 2016
…egistering types. (#228) Change triggered by https://bugzilla.xamarin.com/show_bug.cgi?id=44448 It's possible for the register call to be called on a thread that hasn't been registered with Mono yet. As such, the `mono_domain_get` call will return NULL until `mono_jit_thread_attach` is invoked where domain information for the current thread becomes correct. This is an issue because it means we invoke `monodroid_runtime_invoke` passing NULL as a bogus domain argument. This caused a crash with `mono_domain_set` as it doesn't support being passed a NULL domain. This commit solves the problem by re-requesting the current domain after the `mono_jit_thread_attach` call. If the thread had been registered beforehand, this will essentially be a no-op as it should return the same domain again. If it hadn't, attaching the thread will have set the current domain to be the root appdomain which will be returned by `mono_domain_get` making our current domain variable now valid.
jonpryor
pushed a commit
that referenced
this pull request
Sep 20, 2016
…egistering types. (#228) Change triggered by https://bugzilla.xamarin.com/show_bug.cgi?id=44448 It's possible for the register call to be called on a thread that hasn't been registered with Mono yet. As such, the `mono_domain_get` call will return NULL until `mono_jit_thread_attach` is invoked where domain information for the current thread becomes correct. This is an issue because it means we invoke `monodroid_runtime_invoke` passing NULL as a bogus domain argument. This caused a crash with `mono_domain_set` as it doesn't support being passed a NULL domain. This commit solves the problem by re-requesting the current domain after the `mono_jit_thread_attach` call. If the thread had been registered beforehand, this will essentially be a no-op as it should return the same domain again. If it hadn't, attaching the thread will have set the current domain to be the root appdomain which will be returned by `mono_domain_get` making our current domain variable now valid.
radical
pushed a commit
that referenced
this pull request
May 8, 2018
Added Gendarme Configuration, to build `Java.Interop.dll` with mcs compiler in a separate output directory `bin/GendarmeDebug`. Updated `fxcop` rule in `Makefile` to let gendarme use mcs compiled version with `.mdb` symbols file to have source file line information again.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Change triggered by https://bugzilla.xamarin.com/show_bug.cgi?id=44448
It's possible for the register call to be called on a thread that hasn't been registered with Mono yet. As such, the
mono_domain_getcall will return NULL untilmono_jit_thread_attachis invoked where domain information for the current thread becomes correct.This is an issue because it means we invoke
monodroid_runtime_invokepassing NULL as a bogus domain argument. This caused a crash withmono_domain_setas it doesn't support being passed a NULL domain.This commit solves the problem by re-requesting the current domain after the
mono_jit_thread_attachcall. If the thread had been registered beforehand, this will essentially be a no-op as it should return the same domain again. If it hadn't, attaching the thread will have set the current domain to be the root appdomain which will be returned bymono_domain_getmaking our current domain variable now valid.