File tree 1 file changed +7
-0
lines changed 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -3638,6 +3638,10 @@ collect_threads (MonoInternalThread **thread_array, int max_threads)
3638
3638
{
3639
3639
CollectThreadsUserData ud ;
3640
3640
3641
+ mono_memory_barrier ();
3642
+ if (!threads )
3643
+ return 0 ;
3644
+
3641
3645
memset (& ud , 0 , sizeof (ud ));
3642
3646
/* This array contains refs, but its on the stack, so its ok */
3643
3647
ud .threads = thread_array ;
@@ -5618,6 +5622,9 @@ mono_threads_summarize (MonoContext *ctx, gchar **out)
5618
5622
MonoInternalThread * thread_array [128 ];
5619
5623
int nthreads = collect_threads (thread_array , 128 );
5620
5624
5625
+ if (nthreads == 0 )
5626
+ MOSTLY_ASYNC_SAFE_PRINTF ("No managed threads detected, error occured before thread init\n" );
5627
+
5621
5628
sigset_t sigset , old_sigset ;
5622
5629
sigemptyset (& sigset );
5623
5630
sigaddset (& sigset , SIGTERM );
You can’t perform that action at this time.
0 commit comments