@@ -5508,10 +5508,10 @@ MONO_RESTORE_WARNING
5508
5508
if (decoded_args -> named_args_info [j ].field && !strcmp (decoded_args -> named_args_info [j ].field -> name , "EntryPoint" )) {
5509
5509
named = (const char * )decoded_args -> named_args [j ]-> value .primitive ;
5510
5510
slen = mono_metadata_decode_value (named , & named );
5511
-
5511
+
5512
5512
int prefix_len = (int )strlen (acfg -> user_symbol_prefix );
5513
5513
g_assert (prefix_len < 2 );
5514
-
5514
+
5515
5515
export_name = (char * )g_malloc (prefix_len + slen + 1 );
5516
5516
if (prefix_len == 1 )
5517
5517
export_name [0 ] = * acfg -> user_symbol_prefix ;
@@ -5851,12 +5851,14 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
5851
5851
5852
5852
icomparable_inst = mono_class_inflate_generic_class_checked (icomparable , & ctx , error );
5853
5853
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5854
+ g_assert (icomparable_inst );
5854
5855
5855
5856
if (mono_class_is_assignable_from_internal (icomparable_inst , tclass )) {
5856
5857
MonoClass * gcomparer_inst ;
5857
5858
gcomparer = mono_class_load_from_name (mono_defaults .corlib , "System.Collections.Generic" , "GenericComparer`1" );
5858
5859
gcomparer_inst = mono_class_inflate_generic_class_checked (gcomparer , & ctx , error );
5859
5860
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5861
+ g_assert (gcomparer_inst );
5860
5862
5861
5863
add_generic_class (acfg , gcomparer_inst , FALSE, "Comparer<T>" );
5862
5864
}
@@ -5878,13 +5880,15 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
5878
5880
5879
5881
iface_inst = mono_class_inflate_generic_class_checked (iface , & ctx , error );
5880
5882
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5883
+ g_assert (iface_inst );
5881
5884
5882
5885
if (mono_class_is_assignable_from_internal (iface_inst , tclass )) {
5883
5886
MonoClass * gcomparer_inst ;
5884
5887
5885
5888
gcomparer = mono_class_load_from_name (mono_defaults .corlib , "System.Collections.Generic" , "GenericEqualityComparer`1" );
5886
5889
gcomparer_inst = mono_class_inflate_generic_class_checked (gcomparer , & ctx , error );
5887
5890
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5891
+ g_assert (gcomparer_inst );
5888
5892
add_generic_class (acfg , gcomparer_inst , FALSE, "EqualityComparer<T>" );
5889
5893
}
5890
5894
}
@@ -5906,6 +5910,7 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
5906
5910
enum_comparer = mono_class_load_from_name (mono_defaults .corlib , "System.Collections.Generic" , "EnumEqualityComparer`1" );
5907
5911
enum_comparer_inst = mono_class_inflate_generic_class_checked (enum_comparer , & ctx , error );
5908
5912
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5913
+ g_assert (enum_comparer_inst );
5909
5914
add_generic_class (acfg , enum_comparer_inst , FALSE, "EqualityComparer<T>" );
5910
5915
}
5911
5916
}
@@ -5927,6 +5932,7 @@ add_generic_class_with_depth (MonoAotCompile *acfg, MonoClass *klass, int depth,
5927
5932
comparer = mono_class_load_from_name (mono_defaults .corlib , "System.Collections.Generic" , "ObjectComparer`1" );
5928
5933
comparer_inst = mono_class_inflate_generic_class_checked (comparer , & ctx , error );
5929
5934
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5935
+ g_assert (comparer_inst );
5930
5936
add_generic_class (acfg , comparer_inst , FALSE, "Comparer<T>" );
5931
5937
}
5932
5938
}
@@ -5950,6 +5956,7 @@ add_instances_of (MonoAotCompile *acfg, MonoClass *klass, MonoType **insts, int
5950
5956
ctx .class_inst = mono_metadata_get_generic_inst (1 , args );
5951
5957
generic_inst = mono_class_inflate_generic_class_checked (klass , & ctx , error );
5952
5958
mono_error_assert_ok (error ); /* FIXME don't swallow the error */
5959
+ g_assert (generic_inst );
5953
5960
add_generic_class (acfg , generic_inst , force , "" );
5954
5961
}
5955
5962
}
@@ -11566,6 +11573,9 @@ emit_exception_info (MonoAotCompile *acfg)
11566
11573
char * aot_file = g_strdup_printf ("%s%s" , image_basename , SEQ_POINT_AOT_EXT );
11567
11574
char * aot_file_path = g_build_filename (dir , aot_file , (const char * )NULL );
11568
11575
11576
+ g_assert (dir );
11577
+ g_assert (aot_file_path );
11578
+
11569
11579
if (g_ensure_directory_exists (aot_file_path ) == FALSE) {
11570
11580
fprintf (stderr , "AOT : failed to create msym directory: %s\n" , aot_file_path );
11571
11581
exit (1 );
@@ -15345,6 +15355,8 @@ set_paths (MonoAotCompile *acfg)
15345
15355
}
15346
15356
15347
15357
acfg -> tmpbasename = g_build_filename (temp_path , "temp" , (const char * )NULL );
15358
+ g_assert (acfg -> tmpbasename );
15359
+
15348
15360
acfg -> asm_fname = g_strdup_printf ("%s.s" , acfg -> tmpbasename );
15349
15361
acfg -> llvm_sfile = g_strdup_printf ("%s-llvm.s" , acfg -> tmpbasename );
15350
15362
@@ -15379,6 +15391,8 @@ set_paths (MonoAotCompile *acfg)
15379
15391
/* Done later */
15380
15392
} else {
15381
15393
acfg -> tmpbasename = g_build_filename (acfg -> aot_opts .temp_path , "temp" , (const char * )NULL );
15394
+ g_assert (acfg -> tmpbasename );
15395
+
15382
15396
acfg -> asm_fname = g_strdup_printf ("%s.s" , acfg -> tmpbasename );
15383
15397
}
15384
15398
}
@@ -15624,6 +15638,7 @@ compile_assemblies_in_child (MonoAotOptions *aot_opts, MonoAssembly **assemblies
15624
15638
15625
15639
#ifdef HOST_WIN32
15626
15640
response_fname = g_build_filename (aot_opts -> temp_path , "temp.rsp" , (const char * )NULL );
15641
+ g_assert (response_fname );
15627
15642
response = fopen (response_fname , "w" );
15628
15643
g_assert (response );
15629
15644
#endif
0 commit comments