Commit f49873c
authored
[Mono]: Fix stackwalk callbacks calling mono_jit_info_get_method in async signal safe mode. (#123346)
As part of
d34ef7e
a number of additional stack walking scenarios that could run as async
signal safe (called from signal handlers), was flag as being async
signal safe, prevents loading of full MonoJitInfo for AOT methods due to
risk of deadlocks under async signal safe mode.
An AOT methods MonoJitInfo loaded when a thread runs in async signal
safe mode can't be passed to mono_jit_info_get_method or it will trigger
the following assert:
Assertion jit-info.c:918 (!ji->async)
There are some issues reporting this assert for .net10, like:
#122797
After looking over the changes done in
d34ef7e
it appears that two scenarios, get_thread_dump and
mono_handle_native_crash could hit scenarios where it would call
mono_jit_info_get_method using MonoJitInfo loaded under async signal
safe mode.
This PR fixes both these scenarios making sure they correctly check the
async state of MonoJitInfo before calling mono_jit_info_get_method.
For more details,
#122797 (comment).1 parent 868eaef commit f49873c
2 files changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3043 | 3043 | | |
3044 | 3044 | | |
3045 | 3045 | | |
3046 | | - | |
| 3046 | + | |
3047 | 3047 | | |
3048 | 3048 | | |
3049 | 3049 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
598 | 598 | | |
599 | 599 | | |
600 | 600 | | |
601 | | - | |
| 601 | + | |
602 | 602 | | |
603 | 603 | | |
604 | 604 | | |
| |||
2909 | 2909 | | |
2910 | 2910 | | |
2911 | 2911 | | |
2912 | | - | |
| 2912 | + | |
2913 | 2913 | | |
2914 | 2914 | | |
2915 | 2915 | | |
| |||
0 commit comments