Bug 8517 - mono_arch_find_jit_info is not signal safe.
Summary: mono_arch_find_jit_info is not signal safe.
Alias: None
Product: Runtime
Classification: Mono
Component: General ()
Version: unspecified
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Bugzilla
Depends on:
Reported: 2012-11-19 18:15 UTC by Rodrigo Kumpera
Modified: 2015-01-07 11:22 UTC (History)
3 users (show)

Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.

Please create a new report on GitHub or Developer Community with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:

Description Rodrigo Kumpera 2012-11-19 18:15:55 UTC
We disabled stack adjusment as a workaround for #2190. Master has this as a2765786db2947250afabcc2c108d1d081f82e83

We need to figure out a way to handle this properly.
Comment 1 Zoltan Varga 2013-09-13 15:44:24 UTC
This is now fixed by master, mono_find_jit_info () is now async safe is invoked in async context
(mono_thread_info_set_is_async_context ()), but the returned MonoJitInfo is missing some fields like MonoMethod etc., so callers need to be updated to work without this info if possible.

The current cases are as follows:
- The handler block guard code. This has been fixed in 9a6510ece63cee1a0416c123f8de84767b3ae2e2.
- sdb. This has been worked around by eagerly loading jit info for all AOT methods, so 
  mono_aot_find_jit_info () is never called in an async context.
- all the async signal handlers.
Comment 2 Zoltan Varga 2015-01-07 11:22:23 UTC
Fixed some time ago.